garrisonian14 Posted November 22, 2007 Share Posted November 22, 2007 I am working in php, i open a pop up window using javascript function when someone clicks on a link. Now there is a link in this pop up window, when user clicks on this link another pop up window must be opened. i am unable to do this. Can anybody please provide urgent help fo this. Thanx in anticipation Regards, Ali. Quote Link to comment Share on other sites More sharing options...
phpQuestioner Posted November 22, 2007 Share Posted November 22, 2007 an easy way to do this is create an external javascript and put this in it: function myWin(url,puw,puh) { window.open(url,"thisWin","resizable=no,scrollbars=no,toolbar=no,menubar=no,location=no,status=no,directories=no,fullscreen=no,dependent=no,sreenX=0,screenY=0,top=0,left=0,width="+puw+",height="+puh+""); } name the js file what ever you want it to be named. for this example, I will name it "popWindows.js". now then, were ever you want a pop-up window to be; you will do this: <!-- This Loads Your External JS File --> <script type="text/javascript" src="popWindows.js"></script> <!-- ************************************************************** The myWin Functions Is Set-Up Like This ************************************************************** myWin(url,puw,puh) url = the web address/url of your pop-up puw = the width of your pop-up window puh = the height of your pop-up window --> <a href="#" onclick="myWin('page1.php','400','325')">Open Window</a> and this should solve you multiplet pop-up issue. Quote Link to comment Share on other sites More sharing options...
garrisonian14 Posted November 23, 2007 Author Share Posted November 23, 2007 an easy way to do this is create an external javascript and put this in it: function myWin(url,puw,puh) { window.open(url,"thisWin","resizable=no,scrollbars=no,toolbar=no,menubar=no,location=no,status=no,directories=no,fullscreen=no,dependent=no,sreenX=0,screenY=0,top=0,left=0,width="+puw+",height="+puh+""); } name the js file what ever you want it to be named. for this example, I will name it "popWindows.js". now then, were ever you want a pop-up window to be; you will do this: <!-- This Loads Your External JS File --> <script type="text/javascript" src="popWindows.js"></script> <!-- ************************************************************** The myWin Functions Is Set-Up Like This ************************************************************** myWin(url,puw,puh) url = the web address/url of your pop-up puw = the width of your pop-up window puh = the height of your pop-up window --> <a href="#" onclick="myWin('page1.php','400','325')">Open Window</a> and this should solve you multiplet pop-up issue. Thanx for your help, i have done it Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.