jeepslug
04-17-2004, 03:29 PM
I have some javascript that opens a new window when you click on a link. The problem is that it the window that the link is in resets itself to the top of the page. In other words, it scroll all the way to the top. I would like the source window to remain in the place where the link was after opening the new window. Any ideas would be appreciated.
Here is the script I am using:
<script language="javascript" type="text/javascript">
<!--
function showFullImage(sImageName)
{
var winNew = window.open("about:blank", "new", "width=800, height=650, toolbar=yes scrollbars=yes,resizable=yes");
winNew.document.write("<img border='0' src='" + sImageName + "'><br>"); // <== here
winNew.document.write("<center><INPUT TYPE='button' VALUE='Close Window' onClick='window.close()'></center>");
winNew.document.bgColor="#800000"
}
// -->
</script>
Jeepslug
Here is the script I am using:
<script language="javascript" type="text/javascript">
<!--
function showFullImage(sImageName)
{
var winNew = window.open("about:blank", "new", "width=800, height=650, toolbar=yes scrollbars=yes,resizable=yes");
winNew.document.write("<img border='0' src='" + sImageName + "'><br>"); // <== here
winNew.document.write("<center><INPUT TYPE='button' VALUE='Close Window' onClick='window.close()'></center>");
winNew.document.bgColor="#800000"
}
// -->
</script>
Jeepslug