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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.