Js popup url not working

Hello,
I was wondering if someone could help me with a problem I am having with a js popup.

I was reading this article on quicksmode and when I added the code in the begining, it worked flawlessly.

Meaning the result was a popup saying that popupex.html could not be found, which was expected as this script is not running off of the quicksmode server.

I simply tried to change the url and for some reason I can not get the pop up to work.

I am obviously doing something wrong, i just hope its not that stupid :blush:

Here is the code:
in the head:

<script language="javascript" type="text/javascript">
		<!--
		function popitup(url) {
			newwindow=window.open(url,'name','height=200,width=150');
			if (window.focus) {newwindow.focus()}
			return false;
		}
		// -->
	</script>

and the link in the body:

<a href="popupex.html" onclick="return popitup('http://www.facebook.com/sharer.php?u=http://www.the-irf.com&t=The Irf's Website')">Link to popup</a>

btw, the link is the facebook share php sharing a site i made.

I hope someone can help me with this and I would appreciate any and all help.

Thanks in Advance and Best Regards,
Team 1504.

P.S. I just want the above url,

http://www.facebook.com/sharer.php?u=http://www.the-irf.com&t=The Irf's Website

, to popup.
So if anyone has any other ideas on how to get it to do that and that work please let me know. Thank you again.

Put the link you want in the href.

You can also try this:

<a href="http://www.google.com" onclick="return popitup(this.href)">Link to popup</a>

With that same script above in the head, none of my implementations of your suggestions worked :frowning:

Maybe im doing this wrong…

Here is what I had before in the body:

<a href="popupex.html" onclick="return popitup('http://www.facebook.com/sharer.php?u=http://www.the-irf.com&t=The Irf's Website')">Link to popup</a>

then i tried it with the link in the href and in the onclick.

<a href="http://www.facebook.com/sharer.php?u=http://www.the-irf.com&t=The Irf's Website" onclick="return popitup('http://www.facebook.com/sharer.php?u=http://www.the-irf.com&t=The Irf's Website')">Link to popup</a>

then i tried it with your suggestion of using onclick="return popitup(this.href), like so:

<a href="http://www.facebook.com/sharer.php?u=http://www.the-irf.com&t=The Irf's Website" onclick="return popitup(this.href)">

Unfortunately, none of them seemed to work. Well maybe i phrased that wrong, then last one worked. But it opened the link in a new tab not it a pop up.

any ideas or suggestions?