SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Apr 2007
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    popup window with javascript

    I want my small pictures that I have on my website to get a neat popupwindow with the enlarged same picture when they click it.

    This code works but it created aboutly 10 pixels padding around the picture.
    Looks very ugly!

    Code:
    function picture() {
      window.open("picture.jpg","picture","status=0,rezizable=0,width=800,height=530")
    }
    HTML Code:
    <img src="picture_small.jpg" onclick="picture()">
    I also tried the make the javascript open up a html document with the standard tags and between the body tags would be the image.

    Then I put the padding inside the body tag.
    This didn't fix the problem either!


    I would prefer if there was a way to fix the padding problem without creating an extra html document but if there is not I would be happy to know how to fix the problem with a html document aswell.

  2. #2
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Dekaras, Welcome to SPF!

    Have a look at this thread.


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
  •