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();
}
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();
}