Welcome to WebmasterWorld Guest from 54.162.12.134

Forum Moderators: open

Message Too Old, No Replies

javascript for popup window

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

WebmasterWorld Senior Member 10+ Year Member



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)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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)

WebmasterWorld Senior Member 10+ Year Member



tedster - you rock! Perfect.

kat

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

10+ Year Member



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..! :)
 

Featured Threads

Hot Threads This Week

Hot Threads This Month