Forum Moderators: open
If you want a new window to open, it needs to have a unique name. Your code uses the name "popup" for every popup window, so once that window is open, any further clicks just load a new document into the same window.
So try using a different name for the second popup window and see if that isn't the behavior you are aiming for.
in the <body>
<a href="javascript:cPop('abouty.html',300,500)" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('tv','','images/about_07.gif',1)">
and this is the head
<!--
function cPop(url, wide, high) {window.open(url,"popup",'width=' + wide + ',height=' + high);
}
is there somewhere in that code where i can rename it??
Can anyone help or have another script i could use that might work so it shows in another browsers..
thanks again for your help tedster...
{window.open(url,"popup",'width=' + wide + ',height=' + high);
}
It defines several parameters. The second one, "popup", is the name of the window that the function cPop creates -- it's not the name of the HTML file, but the name of the window where that HTML is rendered.
What you need for your situation is a unique window name for each popup. You could pass this name as a parameter as well, just as you pass the url. So try this as the function definition:
function cPop(url, windowname, wide, high) {window.open(url,windowname,'width=' + wide + ',height=' + high);
}
Then in the body, the link to generate the the popup window will now pass four parameters, like this:
<a href="javascript:cPop('abouty.html','win001',300,500)">Click for popup window</a>
Here, win001 is the name of this particular window. For the next link you would use win002 (or any set of unique names you want). This way, each HTML document also gets a unique window.
Hope that helps to clarify what I was saying, and good luck! For clarity's sake I omitted your rollover functionality, but this won't affect anything about the popup window when you include it.
You've changed the cPop function as we discussed above, but in the BODY section, when you use cPop in a javascript link, you must include FOUR parameters in the link:
1. URL to load in the popup
2. Unique name for the popup window
3. Width of the new window
4. Height of the window
The links you currently have online don't including a window name. They have only parameters 1,3,4.
Hope that helps.
[codelifter.com...]