return false not working in IE

I

iswariak

Hi

I am displaying the thumbnails using DOM. I want to display the
enlarged image when we click the thumbnail. The "return false"
statement is not working in IE. When we click the thumbnail in IE both
the parent window and popup show the enlarged picture.

Thanks
Iswaria

------------------------
Code
------------------------

var createanchor = document.createElement("a");
createanchor.href = "../collection/" + pname;
createanchor.className = "imginfo";
var svalue = "displayDetails('" + filename + "', '" + pname + "', '" +
i + "'); return false;";
alert (svalue);
createanchor.onclick = new Function( "displayDetails('" + filename +
"', '" + pname + "', '" + i + "'); return false;" );

displayDetails is a function to display a popup

function displayDetails(filename, photopos, rowid) {

width = 800;
height = 600;

var options = "scrollbars=no, toolbar=no, menubar=no, location=no,
resizable=yes, status=no, width=" + width + ", height=" + height + ",
left=0, top=0";
pop = window.open(url, 1, options);
pop.document.write("<html>");
pop.document.write("<head><title>Image</title></head>");
pop.document.write("<body style='margin:0;padding:0'>" );
pop.document.write("<img src='" + url + "' border='0' alt=''>");
pop.document.write("</body></html>");
pop.document.close();
pop.focus();
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,829
Messages
2,569,737
Members
45,525
Latest member
RosalindSa

Latest Threads

Top