Current location: Hot Scripts Forums » General Web Coding » JavaScript » Opera and JS help please


Opera and JS help please

Reply
  #1 (permalink)  
Old 12-05-04, 09:41 PM
gUsTaV's Avatar
gUsTaV gUsTaV is offline
New Member
 
Join Date: Dec 2004
Location: United States
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Opera and JS help please

The following works well while using NS or IE but not Opera.
In Opera, a blank window with no contents is opened.
Anyone have a suggestion on what to change to make it work in all three?
Thanks for any and all help received.

<!--
function regwin(mylink, windowname, refocus)
{
var mywin, href;

if (typeof(mylink) == 'string')
href=mylink;
else
href=mylink.href;

mywin = window.open('', windowname);


// if we just opened the window
if (
mywin.closed ||
(! mywin.document.URL) ||
(mywin.document.URL.indexOf("about") == 0)
)
mywin.location=href;
else if (refocus)
mywin.focus();
return false;

}
//-->
The following is how it is implemented:
<a href="register.php" onClick="return regwin(this, 'register',true)">link</a>

Last edited by gUsTaV; 12-05-04 at 09:45 PM.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump


All times are GMT -5. The time now is 10:36 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.