John Account
asked on
Open PopUp Window Maximized
Hello Experts. I have thumbnails on a web page that, when clicked, opens a popup window displaying a jpg. I want the popup browser to open maximized, since all the images are different sizes. I'm using the code below, but it's not working. Please advise. Many kind thanks in advance!
<SCRIPT LANGUAGE="JavaScript">
function winPopUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'addressbar=0,toolbar=0,sc rollbars=1 ,location= 0,statusba r=0,menuba r=0,resiza ble=1,scre enX=0,scre enY=0,top= 0,left=0,m aximize=1' );");
}
</script>
<a href="javascript:winPopUp( 'images/ph oto1.jpg') ">Link</a>
<SCRIPT LANGUAGE="JavaScript">
function winPopUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'addressbar=0,toolbar=0,sc
}
</script>
<a href="javascript:winPopUp(
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you, GwynforWeb. Perfect!
w=800
h=600
if (window.screen) {
w = window.screen.availWidth;
h = window.screen.availHeight;
}
window.open('myPage.html',
HTH