[I've also posted this to comp.lang.javascript... but damn that group has
some real assholes on it.]

The more I consider this the more I think it may be a bug in FireFox... I
just don't think browsers should handle this in this fashion.  What do you
guys think?

The scenario:  1) Generate a popup window via script.  2) Populate it (again

via script) with content that features local (hash) links.

In IE 6.x this works - the links work as they should, moving the document to

that document position.  However in FireFox 1.x the links load the main page

(the opener) in to the popup.

Both browsers populate the location.href of the popup with the main page's 
href... but this only adversely affects FireFox (which seems to, in this 
scenario, reload the whole page on a local  link).  I tried manually 
populating the location.href but no joy.

I've appended an example which demonstrates the problem.  I've tried to 
shave it down as much as I could.  Just save it to an HTML page and load it 
up in FireFox.  Click the button then scroll down and click the link... 
instead of returning to the top of the page I get the opener page's HTML 
populated into the popup.

Any thoughts on how to address this?  I've Googled, but it may just be that 
I've been unable to hit on the right terms to uncover the answer.

Thanks in advance for any direction,

Jim Davis


<html>
<head>
 <title>Test Page</title>
 <script type="text/JavaScript">
  function CreateTestPopup() {
    // Create Window
   TestWindow = 
window.open("","TestWindow","scrollbars=yes,resizable=yes,width=500,height=4
00");
   var TW = TestWindow.document;
    // Write the HTML
   TW.write( "<html><head>",
      "</head><body>",
      "<a name='PageTop'>Page Top</a>",
      "<br><br><br><br><br><br><br><br><br><br><br>",
      "<a href='#PageTop'>Go To Page Top</a>",
      "</body></html>");
  };
 </script>
</head>
<body>
 <p>This is just a test page.</p>
 <p><input type="button" onclick="CreateTestPopup();" value="Launch 
Popup"></p>
</body>
</html>




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how to get a fax number that sends and receives faxes using your 
current email address
http://www.houseoffusion.com/banners/view.cfm?bannerid=64

Message: http://www.houseoffusion.com/lists.cfm/link=i:5:171838
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/5
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:5
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.5
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to