Javascript Pop-up window

This is a discussion on Javascript Pop-up window within the Macromedia Flash forums in Adobe Tools category; 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. ...

Go Back   Application Development Forum > Adobe Tools > Macromedia Flash

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 05-19-2008, 06:11 PM
sadfba
Guest
 
Default Javascript Pop-up window

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.

\

Reply With Quote
  #2  
Old 05-19-2008, 11:29 PM
sadfba
Guest
 
Default Re: Javascript Pop-up window

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);
}


Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 11:53 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.