homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

javascript for popup window

 11:58 pm on Mar 13, 2001 (gmt 0)

I need a javascript for a popup window but the only ones I can find only allow for one size of window. I need a script that passes the size parameter when you click the link. I'm having thumbnails enlarge into popup windows on click and not all the images are the same size.



 12:12 am on Mar 14, 2001 (gmt 0)

Oil, a couple of us were hacking away on this in another thread, trying to get the simplest code. Here's the result:

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>

Edited by: tedster


 12:14 am on Mar 14, 2001 (gmt 0)

tedster - you rock! Perfect.


 5:30 am on Mar 14, 2001 (gmt 0)

you guys rock.. that was just the same question i was going to ask...as i need that popup window to be a specific size... but i see ya beat me to it!! thanks for the help anywayz..! :)

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved