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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pop up in Javascript error in flash, I can't figure!! 1

Status
Not open for further replies.

hoja

Technical User
Dec 3, 2003
102
US
Hi, another question....I have 6 different pieces of text on my my movie, and each one has the following URL

---------------------------------------------------
javascript:eek:penNewWindow('orange_fuego.html','thewin','height=300,width=400,toolbar=no,scrollbars=no');
--------------------------------------------------

And so I have one of these lines for each piece of text aimed at a different html page....


Now this is my code on my index.html page:

---------------------------------------------------
<script language="JavaScript">
function openNewWindow(URLtoOpen, windowName, windowFeatures) {
newWindow=window.open(URLtoOpen, windowName, windowFeatures);
}
</script>
---------------------------------------------------

And on the embeded tags I have

swLiveConnect=true NAME=main_site.swf

It seems to be working, but for some reason once I click the first one, the rest of my links go to the same page,, so they are not poping up their respective html page, I don't understand !!! please help
 
Do you have 6 different htmls or are you allways linking to 'orange_fuego.html'?
 
no, I created all 6 differetn htmls, and each one of those links is linked to it's certain html page.
 
Might just be the unecessary variable assignment. Take newWindow = out of your function.

Code:
<script language="JavaScript">
    function openNewWindow(URLtoOpen, windowName, windowFeatures) {
        window.open(URLtoOpen, windowName, windowFeatures);
    }
</script>

Hope it helps.

Wow JT that almost looked like you knew what you were doing!
 
Also if you name the window the same (in your windowName) parameter then the content of one window will replace the content of the previous one, you'll need to change the name of each individual window for them all to appear separately.
 
wangbar, not sure what you mean, would it be posible for you to give me an example please....I tried what Pixl8r said, but it's still not working !!
 
Code:
javascript:openNewWindow('orange_fuego.html','thewin1','height=300,width=400,toolbar=no,scrollbars=no');

then

Code:
javascript:openNewWindow('orange_fuego.html','thewin2','height=300,width=400,toolbar=no,scrollbars=no');

etc - the windows need different names.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top