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!

strange pop-up behavior 2

Status
Not open for further replies.

frag

Programmer
Dec 7, 2000
321
GB
hi!

i have a small problem with javascript and the open methode.
here is my code (sorry, but it is in german):

Code:
<html><head><title>Test</title>
<script type=&quot;text/javascript&quot;>
<!--
function NeuFenster() {
 MeinFenster =
 window.open(&quot;datei2.htm&quot;, &quot;Zweitfenster&quot;, &quot;width=300,height=200,scrollbars&quot;);
 MeinFenster.focus();
}
//-->
</script>
</head><body>
<a href=&quot;javascript:NeuFenster()&quot;>Neues Fenster</a>
</body></html>

this works perfectly fine. a link will be displayed and after clicking the link a new small pop-up window will appear.
if i have two explorer instances open with the above file and i press the link in the first ie-window the pop-up will appear but if i us the link in the second window there won't be a new/second pop-up. instead the old pop-up window gets reloaded. this is annoying! i would like to have two pop-ups.

i don't think that the code is the problem. perhapse it's just an ie bug? does someone know a solution for this??

any help is welcome


cheers

frag

patrick.metz@epost.de
 

All you will do is reload the page because you are targetting a window with the same name &quot;Zweitfenster&quot; - you will need to give the pop up windows different names
 
ok that was it, it's working now. but why do i have to use different names? there are two different instances why is the browser not able to differentiate between these two instances? he should be able to know that the first pop-up window (child) just belongs to the first window (parent) and not to any other browser window (which is in my eyes somthing like a new/different parent-object).

does the netscape navigator handle this in the same way?

patrick.metz@epost.de
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top