rubixD
10-09-2002, 10:50 AM
I have a page setup with photos inside of an iframe. When someone clicks on the a photo it opens a new window, also (this is where my problem lies) when they click on the photo it scrolls the iframe back to the top, I was wondering if there was a simple way to correct this.
This is the script to open the new window itself iside the iframe:
<script language="javascript">
var image
function loadPhotowindow(image)
{
var s1="<title>"+image+"</title>"
var s2="<body bgcolor=black leftmargin=0 topmargin=5 marginwidth=0 marginheight=0><center>"
var s3="<img src='"+image+"' border=0>"
var s4="<br>"
var s5="<form><input type='button' value='close' onClick='self.close()'>"
var s6="</form></center>"
photoWindow=window.open("", 'rubixPhotos', config='height=540, width=650, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no')
photoWindow.document.write(s1+s2+s3+s4+s5+s6)
photoWindow.document.close()
}
</script>
..and here is the script for the iframe itself inside a table data cell:
<td width=564>
<iframe src="begin.html" height="100%" width="100%" frameborder=0 name="main"></iframe>
</td>
This is the script to open the new window itself iside the iframe:
<script language="javascript">
var image
function loadPhotowindow(image)
{
var s1="<title>"+image+"</title>"
var s2="<body bgcolor=black leftmargin=0 topmargin=5 marginwidth=0 marginheight=0><center>"
var s3="<img src='"+image+"' border=0>"
var s4="<br>"
var s5="<form><input type='button' value='close' onClick='self.close()'>"
var s6="</form></center>"
photoWindow=window.open("", 'rubixPhotos', config='height=540, width=650, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no')
photoWindow.document.write(s1+s2+s3+s4+s5+s6)
photoWindow.document.close()
}
</script>
..and here is the script for the iframe itself inside a table data cell:
<td width=564>
<iframe src="begin.html" height="100%" width="100%" frameborder=0 name="main"></iframe>
</td>