| | |
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
![]() |
•
•
Join Date: Jun 2004
Posts: 247
Reputation:
Solved Threads: 1
Hi
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.
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
function winSwap(winLink) { alert('function called'); var newWin = winLink; if(window.opener && !window.opener.closed){ window.opener.location = winLink; window.opener.focus(); alert(winLink); } else { window.open(winLink, 'newWinName'); alert('new window called'); } }
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.
•
•
Join Date: Jun 2004
Posts: 247
Reputation:
Solved Threads: 1
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:
To call the function.
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
<a href="" onClick="winSwap('http://www.siteurl.com');">link</a>
To call the function.
![]() |
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: URGENT! JavaScript form Validation
- Next Thread: Is there software or a service for putting scripts together?
Views: 534 | Replies: 1
| Thread Tools | Search this Thread |
Tag cloud for JavaScript / DHTML / AJAX
acid2 ajax ajaxcode ajaxhelp animate api automatically beta boarder box bug calendar card checkbox child class column cookies createrange() css cursor decimal design dom download dropdown editor element error events explorer firehose flash form forms google gwt html htmlform ie8 iframe image() images index internet java javascript jawascriptruntimeerror jquery jsf jsfile jump listbox math matrixcaptcha microsoft mimic mp3 mp4 mysql object offline onmouseoutdivproblem onmouseover onreadystatechange parameters parent passing php player post problem progressbar rating regex runtime search select session shopping size sql star starrating stars stretch text textarea twitter validation w3c web website window windowofwords windowsxp wysiwyg xml xspf \n





