SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Addict goma's Avatar
    Join Date
    Jan 2002
    Location
    smelly armpit of Asia
    Posts
    305
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    accurate sizing of pop-up

    I've been using pop-ups for some time now and I still can't figure out how to get the image to fit perfectly in the new window. There's always a few pixels of background showing and I have to increase the size of the window just to have the spaces around the image to even out. Is there any way to completely remove the vertical and horizontal spaces in pop-ups?
    http://www.soapbox101.com

  2. #2
    Sultan of Ping jofa's Avatar
    Join Date
    Mar 2002
    Location
    SvÝ■jˇ­
    Posts
    4,080
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <body leftmargin="0" topmargin="0">

  3. #3
    SitePoint Addict goma's Avatar
    Join Date
    Jan 2002
    Location
    smelly armpit of Asia
    Posts
    305
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    But I'm opening a pop-up for an image, not an html file. How do I do this with javascript?
    http://www.soapbox101.com

  4. #4
    Sultan of Ping jofa's Avatar
    Join Date
    Mar 2002
    Location
    SvÝ■jˇ­
    Posts
    4,080
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Open the popup window and write some html to it:

    <a href="javascript://" onclick="var w=window.open('','','top=0,left=0,width=100,height=100,toolbars=no');w.document.write('<html><body leftmargin=\'0\' topmargin=\'0\'><img src=\'yourImage.gif\'/></body></html>');">Popup image</a>

  5. #5
    SitePoint Addict goma's Avatar
    Join Date
    Jan 2002
    Location
    smelly armpit of Asia
    Posts
    305
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ahh, I didn't know you could do that. nice...

    Thanks jofa!!
    http://www.soapbox101.com


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
  •