Hi,
I'm using this script to open the enlarge version of a thumbnail image, in a new window: <a href="images/enlarge/20ans_1.jpg" onclick="window.open (this.href, 'child', 'height=400,width=600'); return false">
But the pictures opens smaller than the window and I have to click on the miage (zoom tool) to get the full size.
What's wrong ?
Thank you
Philippe

window.open will not work in the majority of users browser, they will not turn off the popup blocker for your potentially malicious site
use a layer in the existing page to give the appearance of a new window without being blocked

Do you mean an hidden div ?

yes a hidden div, or a div that you toggle z-index -100 to hide, +100 to show,

<button onClick="showIt();">Important Information</button><script type="text/javascript">
<!--
(document.getElementById) ? dom = true : dom = false;
function hideIt() {
if (dom) {document.getElementById("layerm1").style.visibility='hidden';}
if (document.layers) {document.layers["layerm1"].visibility='hide';} }
function showIt() {
if (dom) {document.getElementById("layerm1").style.visibility='visible';}
if (document.layers) {document.layers["layerm1"].visibility='show';} }
--></script><div id="layerm1" class='bottom' style="position:fixed; left:10px; top:30px; width:50%; visibility:hidden; padding:10px; margin:10px; background:#ececec; border: 1px solid;">
<center><font size="+1"><b>Multi unit residences</b>:</font></center>Tenants &amp; Residents Multi Unit Residential Developments of have different responsibilities to Tenants &amp; Residents of Single homes.<button onClick="hideIt();">Close</button></div>

this scrap produces a layer that hides and displays onclick, its a part of a page, I think I clipped it all
might helpo in development

Thanks for the info

at least then you can specify image dimensions et al in the html for the layer
yesterday I was sleepy when I posted
today not much better, but I couldnt find any blatant screwups in the code

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.