SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Addict superbird's Avatar
    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...

  2. #2
    Irritability Defined
    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).
    My 2 Cents (or is that 2.2 Cents including GST?)

  3. #3
    SitePoint Addict Drinky's Avatar
    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>
    and call it like this:

    <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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •