[thelist] js popup images

Keith cache at dowebscentral.com
Mon Apr 22 12:15:01 CDT 2002


At 08:12 AM Monday 4/22/02, Eric wrote:
>I think it's the (url) bit
>thats tripping up the script....

You're right, it's the url bit. You are writing the document for that
window, so you want the window.open to open blank. Your window.open should
be (note that "url" was replaced by two quote marks)

newWindow =
window.open('','newWin','width='+wdth+',height='+hght+',top='+screenTop+',l
eft='+screenLeft+',screenY='+screenTop+'
screenX='+screenLeft+',status=no,scrollbars=no,resizable=no');


Then in the doc you are writing you need to include an img tag to call the
image, like so

newWindow = document.write('<html>'+
'<head>'+
'<title>Larger Image</title>'+
'<style type="text/css">'+
'body {margin: 0px; top:0px; left:0px; }'+
'</style>'+
'</head>'+
'<body>'+
'<img src="'+url+'">'+
'</body>'+
'</html>');

You actually need to declare "no" to only one of the window attributes, if
any attributes are declared "no" they all default to "no" and any
attributes that you want "yes" then need to be explicitly declared "yes".



keith

cache at dowebscentral.com




More information about the thelist mailing list