SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
Thread: different sized pop-ups
-
Feb 20, 2001, 04:16 #1
- Join Date
- Aug 2000
- Location
- Swansea, UK
- Posts
- 260
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
This is probably really obvious but how do I make the popups on a page different sizes?
...KartLink...
-
Feb 20, 2001, 05:41 #2
- Join Date
- Jul 2000
- Location
- 80,000 feet below the surface
- Posts
- 1,442
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
You'd create different popup functions for each (so if you need 3 popup windows with different specifications, write 3 JScript functions with their dimensions).
-
Feb 23, 2001, 16:25 #3
- Join Date
- Jan 2001
- Location
- England
- Posts
- 338
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Or you could just use 1 function thus:
Code:<script language="javascript"> function openPopUp(WindowURL,WindowName,X,Y){ var newPopUp = window.open(WindowURL,WindowName,'toolbar=no,location=no,directories=no,status=no,resizable=no,copyhistory=no,width=' + X +',height=' + Y) } </script>
<a href="#" onclick="openPopUp('temp.html','myWin',200,200)">open</a>
<a href="#" onclick="openPopUp('temp.html','myWin2',250,300)">open</a>
by writing a function that accepts url, name, height, and width. you can use the same function with different arguments to create as many windows as you like.Drinky
Bookmarks