| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| I am having a problem with my site http://www.design.iamericscott.com I am using Javascript to open pop-up windows to display websites I have designed. The problem I am having is when I open a site that is html based and navigate through the site my launch button doesn't work when the user returns to my design site. I am not having the problem if the site being opened is flash based. These are the functions I am using the vars are being passed by an xml file. The first to close any open windows. The second to open a new window. function closeWindow() { getURL("javascript:myWin1.close(); void(0);"); } function openWindow(ur:String, wh:Number, he:Number, sc:Number, re:Number):Void { openWin1 = function(url, winName, w, h, toolbar, location, directories, status, menubar, scrollbars, resizable) { getURL("javascript:var myWin1;if (!myWin1 || myWin1.closed){myWin1=window.open('"+url+"', '"+winName+"', '"+"width="+w+", height="+h+", toolbar="+toolbar+", location="+location+", directories="+directories+", status="+status+", menubar="+menubar+", scrollbars="+scrollbars+", resizable="+resizable+", top='+((screen.height/2)-("+h/2+"))+', left='+((screen.width/2)-("+w/2+"))+'"+"')} else{myWin1.focus();};void(0);"); }; address = ur; winName = "design"; width = wh; height = he; toolbar = 0; location = 0; directories = 0; status = 0; menubar = 0; scrollbars = sc; resizable = re; openWin1(address,winName,width,height,toolbar,loca tion,directories,status,menub ar,scrollbars,resizable); } If I wait for five seconds or so my launch button starts working again. If anyone has a clue as to why this is happening, a response would be greatly appreciated. \ |
|
#2
| |||
| |||
| Solved Added myWin1.blur to if statement and everthing is working. function openWindow(ur:String, wh:Number, he:Number, sc:Number, re:Number):Void { openWin1 = function(url, winName, w, h, toolbar, location, directories, status, menubar, scrollbars, resizable) { getURL("javascript:var myWin1;if (!myWin1 || myWin1.closed || myWin1.blur){myWin1=window.open('"+url+"', '"+winName+"', '"+"width="+w+", height="+h+", toolbar="+toolbar+", location="+location+", directories="+directories+", status="+status+", menubar="+menubar+", scrollbars="+scrollbars+", resizable="+resizable+", top='+((screen.height/2)-("+h/2+"))+', left='+((screen.width/2)-("+w/2+"))+'"+"')} else{myWin1.focus();};void(0);"); }; address = ur; winName = "design"; width = wh; height = he; toolbar = 0; location = 0; directories = 0; status = 0; menubar = 0; scrollbars = sc; resizable = re; openWin1(address,winName,width,height,toolbar,loca tion,directories,status,menub ar,scrollbars,resizable); } |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.