First of all, if a pop-up window is launched as a direct result of a user clicking on a link, as it is in this case, it almost never (I've never seen it) results in a browser blocking the pop up. The logic is, you clicked on it, you got it. Second, your syntax looks a tiny bit off, the space between the two red characters below could create problems if it is not the actual syntax recommended and the program has any problems dealing with unexpected spaces (problems perhaps only apparent to the referred friend when they try to visit your page from the link this program sends them):
Code:
window.open('your-url-to-this-program.cgi?referrer= '+window.location.href,' ','width=420,height=420');return false;
Using it this way is more 'normal' and passes no space:
Code:
window.open('your-url-to-this-program.cgi?referrer='+ window.location.href,' ','width=420,height=420');return false;
Now the equivalent to the whole thing rendered as a normal link is:
HTML Code:
<a href="your-url-to-this-program.cgi?referrer=http://www.yourdomain.com/thispage.htm" target="_blank">Tell a Friend</a>
Now this can be confusing so let me write it using what you used in your example:
Code:
<a href="http://www.mysite.com/cgi-bin/thisprogram/thisprogram.cgi?referrer=http://www.mysite.com/index.htm" target="_blank">Tell a Friend</a>
That part in red is the absolute path to the page that you want referred to the program er, friend.
Bookmarks