[thelist] pop-up window with no numbers in link

Michael Mell mike at nthwave.net
Wed Oct 23 11:19:00 CDT 2002


On Wednesday, October 23, 2002, at 07:39  AM, Reuben Whitehouse wrote:

> i need to have some links within a body of text that open up seperate
> javascript windows.  the issue i have is that i can't have the numbers
> within the link that there usually are (eg. <a
> href="javascript:openNewWindow('pop-
> up_signup.php','thewin','height=400,widt
> h=399,toolbar=no,scrollbars=no')">).  reason being i have a script that
> changes any numbers within the body text to being <sup></sup>, so when
> i put
> the above javascript link in, it messes up the numbers and i just end
> up
> with a huge pop-up window.
You could put the window dimensions in the script:
<script>
function popUpWin(theURL, winName) {
	if (isNaN(window.screenX)) { // isNan handles browsers that don't have
window.screenXY values
		locX = 10;
		locY = 20;
	} else { // position the new window 10 over and 20 down from the
parent window
		locX = window.screenX +10;
		locY = window.screenY +20;
	}
	settings='width=399,height=400,top='+ locY +',left='+ locX
+',scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolba
r=no,resizable=yes';
	win=window.open(theURL,winName,settings);
}
function loadURL(theURL) { // load a page in the opener and close the
popup
	window.opener.location.href = theURL;
	self.close();
}
function closePopUp() {
	self.close();
}
</script>




More information about the thelist mailing list