Javascript Window Swap and IE6

Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

Join Date: Jun 2004
Posts: 247
Reputation: cmills83 is an unknown quantity at this point 
Solved Threads: 1
cmills83 cmills83 is offline Offline
Posting Whiz in Training

Javascript Window Swap and IE6

 
0
  #1
Oct 20th, 2008
Hi

JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. function winSwap(winLink) {
  2. alert('function called');
  3. var newWin = winLink;
  4. if(window.opener && !window.opener.closed){
  5. window.opener.location = winLink;
  6. window.opener.focus();
  7. alert(winLink);
  8. } else {
  9. window.open(winLink, 'newWinName');
  10. alert('new window called');
  11. }
  12. }
Alright this code works fine everywhere but IE6, like everything else. Anyway the site opens a target blank window and on that window is that function to change the url of the opener and refocus the opener. Everypage with the function is atleast 1 page away from the target blank window that is opened so Im assuming ie6 doesnt know there is an opener anymore. Does anyone have another way of doing this?

Works fine in ie6 when you click from the page that is directly opened, but if you go to a new page on that window it no longer works. Thanks.
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 247
Reputation: cmills83 is an unknown quantity at this point 
Solved Threads: 1
cmills83 cmills83 is offline Offline
Posting Whiz in Training

Re: Javascript Window Swap and IE6

 
0
  #2
Oct 20th, 2008
Nevermind, this code seems to work fine, something else on the site is causing it not to work. If anyone ever wants to use this, use the script above and also:

JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. <a href="" onClick="winSwap('http://www.siteurl.com');">link</a>

To call the function.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the JavaScript / DHTML / AJAX Forum


Views: 534 | Replies: 1
Thread Tools Search this Thread



Tag cloud for JavaScript / DHTML / AJAX
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC