Tombo
11-13-2002, 05:09 PM
Hullo,
Say you have a regular link to an image. When you click the link, the image is opened in the same browser window, aligned to the top left, with a white background and margins of 10 all around.
What I'm hoping to do: provide settings for this "default white page" that contains the image.
For example, when the link is clicked and the image is displayed, the page it's shown on has a back background, the image appears in the center of the page (most likely using a table), and there are no margins all around.
I currently have a pop-up image script I've modified and have been using for a while. I was wondering if there was a way to modify it so that the image would not open in a pop-up window (which is what the script does).
(The script also adds a title to the pop-up-window, along with a comment at the bottom of the image. The comment I would like to keep for the new modified script.)
The script:
Head Section:
<script>
<!--
function popimage(imagesrc,winwidth,winheight,imgdesc){
var look='width='+winwidth+',height='+winheight+','
popwin=window.open("","",look)
popwin.document.open()
popwin.document.write('<title>Page Title</title><body bgcolor="#000000" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0"><img src="'+imagesrc+'"><br><table border="0" cellpadding="5" cellspacing="0" width="100%"><tr><td width="100%" align="left"><font face="verdana" size="1" color="ffffff">'+imgdesc+'</font></td></tr></table></body>')
popwin.document.close()
}
//-->
</script>
Body Section (actual link):
<a href="" onClick="popimage('img.jpg',512,384,'Image Comment.');return false">link</a>
So, if that script could be modified, great. If not, great too. I'm just hoping for something that would get the job done. (A script that works the same way, with similar properties in the a href tag, would be nice. :D )
(By the way, the script will be used with a frame set. I'll have one frame on the side with thumbnails, and one larger frome to show the picture. As the thumbnail is clicked, the image will apear in the larger frame, centered, with a black background, and possibly a comment at the bottom.)
Thanks
Say you have a regular link to an image. When you click the link, the image is opened in the same browser window, aligned to the top left, with a white background and margins of 10 all around.
What I'm hoping to do: provide settings for this "default white page" that contains the image.
For example, when the link is clicked and the image is displayed, the page it's shown on has a back background, the image appears in the center of the page (most likely using a table), and there are no margins all around.
I currently have a pop-up image script I've modified and have been using for a while. I was wondering if there was a way to modify it so that the image would not open in a pop-up window (which is what the script does).
(The script also adds a title to the pop-up-window, along with a comment at the bottom of the image. The comment I would like to keep for the new modified script.)
The script:
Head Section:
<script>
<!--
function popimage(imagesrc,winwidth,winheight,imgdesc){
var look='width='+winwidth+',height='+winheight+','
popwin=window.open("","",look)
popwin.document.open()
popwin.document.write('<title>Page Title</title><body bgcolor="#000000" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0"><img src="'+imagesrc+'"><br><table border="0" cellpadding="5" cellspacing="0" width="100%"><tr><td width="100%" align="left"><font face="verdana" size="1" color="ffffff">'+imgdesc+'</font></td></tr></table></body>')
popwin.document.close()
}
//-->
</script>
Body Section (actual link):
<a href="" onClick="popimage('img.jpg',512,384,'Image Comment.');return false">link</a>
So, if that script could be modified, great. If not, great too. I'm just hoping for something that would get the job done. (A script that works the same way, with similar properties in the a href tag, would be nice. :D )
(By the way, the script will be used with a frame set. I'll have one frame on the side with thumbnails, and one larger frome to show the picture. As the thumbnail is clicked, the image will apear in the larger frame, centered, with a black background, and possibly a comment at the bottom.)
Thanks