PDA

View Full Version : HELP!! Popup Syntax for multiple popup links on a webpage


realwelder
11-16-2002, 08:48 PM
I have used the popup code generator to create a popup window for some pictures on my website. However, I cannot find a way to have multiple links on the main page to bring up multiple windows.

Below is the code i am using:
<script>


function openpopup(){
var popurl="canst111502.htm"
winpops=window.open(popurl,"","width=400,height=338,status,scrollbars,")
}
</script>

<a href="javascript:openpopup()">Canal St - 11-15-02</a>

What I would like to do is add another link to my page but am not sure how to set multiple variables. Can anyone help!!!


Thanks in advance Rob

Spookster
11-16-2002, 09:39 PM
And why did you post this in the Post a Javascript forum? Did you not read the "Read this before you post a script" thread?

piniyini
11-16-2002, 09:41 PM
Hello Rob,

Firstly I would like to point out that this is not the place to ask about javascript. You must go to javascript programming forum to ask about this sort of stuff.

To answer your question

Use the following script ...

<script><!--
function OpenPopWin(url)
{
window.open(url,"","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=400,height=338");
}
//--></script>

And call the window in the following way

<a href="javascript:OpenPopWin("the address here");">Link</a>

note that the url will be visible in the status bar. & remember to put the url in speech marks when calling it.

If you dont want the url visible in the status bar and want to call it someother way, just private msg me & I'll let you know.

I've just done this script quickly..

Hope this helps.