Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Popup problems 1

Status
Not open for further replies.

rissac

Technical User
May 9, 2003
79
IN
I found the perfect javascript for popup windows. I'm using the popup javascript to open different quicktime movies but the only problem I'm having is if a put different instance of the javascript in my html document they all pop up the same movie, eventhough I have them referencing different movies. This particular javascipt is only within the body tags. The url is below. Does any have any recommendations?

The boot key link and the bone fish links are the ones.

code:

<script>
function openpopup(){
var popurl=&quot;winpops=window.open(popurl,&quot;&quot;,&quot;width=400,height=338,&quot;)}
</script>




<script>
function openpopup(){
var popurl=&quot;winpops=window.open(popurl,&quot;&quot;,&quot;width=400,height=338,&quot;)}
</script>

 
I think you have to take different names for your functions. Let me guess... you always get the Bootkey_Sample movie. Try to name the first function openpopup1 and the second one openpopup2 for example.

patrick.metz@epost.de
 
Yes your right about it opening up the same movie. I tried your recommendation but I get an error. An object expected error, line 1, character 1. Is there any way to name these openpops in a way that will work?
 
can't imagine that this should not work (see below).
of course you will have to change functions name in your links or however you call these functions.

Code:
<script>
function openpopup1(){
var popurl=&quot;[URL unfurl="true"]http://www.boatingfla.com/test/Movies/BoneFish.mov&quot;;[/URL]
winpops=window.open(popurl,&quot;&quot;,&quot;width=400,height=338,&quot;)}
</script>


<script>
function openpopup2(){
var popurl=&quot;[URL unfurl="true"]http://www.boatingfla.com/test/Movies/Bootkey_Sample.mo...;[/URL]
winpops=window.open(popurl,&quot;&quot;,&quot;width=400,height=338,&quot;)}
</script>



patrick.metz@epost.de
 
Thanks Patrick that work. I was leaving the 1 and 2 out of the call script below.

<a href=&quot;javascript:eek:penpopup1()&quot; style=&quot;color: blue; text-decoration: none&quot;>

Thanks for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top