...

View Full Version : multiple popups



kelster
09-25-2003, 12:14 AM
I am trying to use this script for several links on the same page, but am not sure how to set it up. All the links end up going to the first link's url


<script>

//Popup Window Script
//By JavaScript Kit (http://javascriptkit.com)
//JavaScript tutorials and over 400+ free scripts

function openpopup(){
var popurl="thankyou.htm"
winpops=window.open(popurl,"","width=400,height=338,")
}

</script>

<a href="javascript:openpopup()">Click here to open window</a>

A1ien51
09-25-2003, 01:42 AM
function openpopup(popurl){

winpops=window.open(popurl,"","width=400,height=338,")
}

</script>

<a href="java script:openpopup('thepage')">Click here to open window</a>

fredmv
09-25-2003, 01:45 AM
<script type="text/javascript">
function openSizedWindow( url )
{
window.open( url, '', 'width=400,height=388');
}
</script>


Then...



<a href="#" onclick="openSizedWindow('file1.html');">Test 1.</a>
<a href="#" onclick="openSizedWindow('file2.html');">Test 2.</a>

kelster
09-25-2003, 04:35 AM
Thanks this worked great.
I appreciate the help.

Kelly

Rowan
11-04-2003, 12:16 PM
I like the script for Kelster's problem, with a pop-up for each URL.
My question is, can this be done using only one pop-up and reloading the content? I saw this technique in an image-viewer script at http://www.javascriptkit.com/script/script2/popimage2.shtml

and would like to use it for my URLS.

guirtsite
11-04-2003, 05:05 PM
I am trying ot use the code from fred mv below, but I get an error 404 when the window pops-up. It say in the window that it cannot find my html document (correct name) on the server. I know that it is looking for the right document....but that document is already on my server? What now?


Please check out:
www.guirtsite.com/branding

go to link #1 for the error please.

Thanks for the help.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum