Jump to content

popup


glenelkins

Recommended Posts

Hi

 

Say i have a link as such: <a href="#" onclick="window.open ( blablabla);">

 

how can i make this popup work, without refreshing the webpage that the link is on? This currently will show the popup but also refreshes the current page

Link to comment
https://forums.phpfreaks.com/topic/39768-popup/
Share on other sites

the way I did it was to have a folder with my help files in it, this javascritp function and the call

function PopupMe(num){
myleft=(screen.width)?(screen.width-800)/2:100;mytop=(screen.height)?(screen.height-600)/2:100;
settings='top=' + mytop + ',left=' + myleft + ',width=500,height=400,location=no,directories=no,menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=no,fullscreen=no, titlebar=no'
var address = "";
switch(num) {
case 1:
address = 'help/comp_admin_help.php';
break;
case 2:
address = 'help/supp_admin_help.php';
break;
case 3:
address = 'help/prod_admin_help.php';
break;
case 4:
address = 'help/ord_admin_help.php';
break;

}
Login=window.open(address,'Login', settings);
Login.focus();
}

<a href="javascript:PopupMe(2)"><img src="../images/icons/help.gif" alt="Help Files" width="55" height="55" border="0" /></a>

 

this way it uses javascript to bring the help files into a popup and has no direct input to the page I am on so it does not refresh - hope that helps

Link to comment
https://forums.phpfreaks.com/topic/39768-popup/#findComment-192058
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.