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

Chris Blessing webguy at mail.rit.edu
Wed Oct 23 09:55:01 CDT 2002


Why not use a function to pull the number from the "<sup>400</sup>" string?
Something like:

function getNumber(str){
	// get position of first closing angle bracket (0-based)
	var fromPos = str.indexOf(">") + 1;

	// get position of last opening angle bracket
	var toPos = str.lastIndexOf("<");

	// return number in between fromPos and toPos
	return str.substring(fromPos, toPos);


Chris Blessing
webguy at mail.rit.edu

> 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','heigh
> t=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.
> does anybody know if its possible to do the pop-ups some other
> way, or know
> of a javascript that'll let you specify the size of the window to be
> popped-up outside of the link?
> tia
> reuben

More information about the thelist mailing list