Hi,
I'm trying to use the following code which should open a popup window.
It doesn't work with Opera 5. Netscape 4.x opens a window in wrong size.
IE 5.5, Netscape 7.0 and Opera 7.11 are ok.
First of all, I have this HTML code:
<a href="image.gif " target="_blank" onclick="screen shot('image.gif ', 'My
Title', '741', '492'); return false;"><img src="image.jpg" ></a>
Plese note that the size of image.gif is 741 x 492 pixels.
And here is my JavaScript function:
function screenshot(file name, wintitle, winwidth, winheight)
{
content = '<html><head><t itle>' + wintitle + '</title></head>';
content += '<body leftmargin="0" rightmargin="0" topmargin="0"
bottommargin="0 " marginwidth="0" marginheight="0 " style="margin: 0px;
padding: 0px">';
content += '<img src="' + filename + '" alt="' + wintitle + '"
onclick="window .close();">';
content += '</body></html>';
body = window.open('', 'content', 'toolbar=0, menubar=0, location=0,
status=0, width=' + winwidth + ', height=' + winheight + ', resizable=1,
scrollbars=0, screenY=5, top=5');
body.document.w rite(content);
body.document.c lose();
}
What should I do with these?
Thanks a lot,
Mika
I'm trying to use the following code which should open a popup window.
It doesn't work with Opera 5. Netscape 4.x opens a window in wrong size.
IE 5.5, Netscape 7.0 and Opera 7.11 are ok.
First of all, I have this HTML code:
<a href="image.gif " target="_blank" onclick="screen shot('image.gif ', 'My
Title', '741', '492'); return false;"><img src="image.jpg" ></a>
Plese note that the size of image.gif is 741 x 492 pixels.
And here is my JavaScript function:
function screenshot(file name, wintitle, winwidth, winheight)
{
content = '<html><head><t itle>' + wintitle + '</title></head>';
content += '<body leftmargin="0" rightmargin="0" topmargin="0"
bottommargin="0 " marginwidth="0" marginheight="0 " style="margin: 0px;
padding: 0px">';
content += '<img src="' + filename + '" alt="' + wintitle + '"
onclick="window .close();">';
content += '</body></html>';
body = window.open('', 'content', 'toolbar=0, menubar=0, location=0,
status=0, width=' + winwidth + ', height=' + winheight + ', resizable=1,
scrollbars=0, screenY=5, top=5');
body.document.w rite(content);
body.document.c lose();
}
What should I do with these?
Thanks a lot,
Mika
Comment