Link to home
Start Free TrialLog in
Avatar of Coast Line
Coast LineFlag for Canada

asked on

modifying code to open popup

I had this function which opens a window in javascript
function windowopen(theURL,winSize) {
				if (winSize == 'page') 					{ myWidth=1000 ; myHeight=700 ; features = 'scrollbars=1, resizable=1, menubar=1' ; }
				else if (winSize == 'list') 			{ myWidth=700 ; myHeight=555 ; features = 'scrollbars=1, resizable=1, menubar=1' ; }
				else if (winSize == 'small') 			{ myWidth=400 ; myHeight=300 ; features = 'scrollbars=1, resizable=1, menubar=1' ; }
				else { myWidth=400 ; myHeight=500 ; features = 'scrollbars=0, resizable=0' ; }

				if(window.screen)
				{
					var myLeft = (screen.width-myWidth)/2;
					var myTop =  (screen.height-myHeight)/2;
					
					features+=(features!='')?',':''; 
					features+=',left='+myLeft+',top='+myTop; 
				}
				
				if (arguments[2]==null)
					window.open(theURL,'',features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight); 
				else		
					window.open(theURL,arguments[2],features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight); 
			}	

Open in new window



i want to convert into a jquery modal using colorbox which i can do

But here is a catch, i am opening one popup for captcha and once the captcha is ok, i want to the window closed and should trigger the above function to open popup window
ASKER CERTIFIED SOLUTION
Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial