Forum Moderators: open

Message Too Old, No Replies

Script for opening lnks in a popup window?

         

victoryrun

1:09 am on Jun 4, 2004 (gmt 0)

10+ Year Member



Hi folks,

I have a page on a website that has lots of info. I have broken it down into categories and would like for each link to open the corresponding info (secondary page) into a popup window. Each popup will be configured (size, location, scrollbars, etc) per LINK not per the whole script. Is there anything basic out there that works well in both IE and NS? I've tried several, but they either seem too complicated or don't cross well....

Thanks!
Victory

victoryrun

2:35 am on Jun 4, 2004 (gmt 0)

10+ Year Member



Okay, I have found this:

1) For the .js file or the HEAD section

function cPop(url, wide, high) {window.open(url,"popup",'width=' + wide + ',height=' + high);
}

2) Link code for the body:

<a href="javascript:cPop('pagename.html',www,hhh)">Link</a>

But when the links are clicked, several of them are half-off the page and the x/y coords are all over the place. Anyway to get them to just center or open 0/0 (top left corner) or something? thanks!