Forum Moderators: open
This is the code I used:
<a href="example.htm" onClick="return openPhotoOneWindow()"
The function:
<line breaks added to features string to stop side scrolling -Tedster>
function openPhotoOneWindow() {
popWindow = window.open('example.htm',"popPhotoWindow",
"width=470,height=340,screenX=20,screenY=20,menubar=no,
resizable=no,scrollbars=no,dependent=yes");
popWindow.focus();
return false;
[edited by: tedster at 11:26 pm (utc) on Mar. 28, 2003]
First, I'd suggest adding onLoad=focus() to the body tag of the pop-up document -- and removing it from the function. Second, put ;return false; into the anchor tag, and also remove it from the function.
So now you have this anchor:
<a href="example.htm" onClick="return openPhotoOneWindow()"; return false;>
This body tag in the pop-up wondow's HTML document:
<body onLoad="focus()">
And this function definition:
function openPhotoOneWindow() {
popWindow = window.open('example.htm',"popPhotoWindow",
"width=470,height=340,screenX=20,screenY=20,menubar=no,
resizable=no,scrollbars=no,dependent=yes");
}