CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Pop Up

Threaded View

  1. #1
    Join Date
    Oct 2003
    Posts
    72

    Exclamation Pop Up

    I have a link to an image I open in a pop up window using this javascript function below to resize the popup window according to the dimensions of the image:

    function enlarge(image)
    {
    var i = new Image();
    i.src = image;
    var x = i.width;
    var y = i.height;
    x+=40;
    y+=40;
    // window.status for degugging:
    window.status = image + " = " + x + " x " + y + " pixels";
    var z = "scrollbars=yes,resizable=yes,,status=no,location=no,toolbar=no,width=" + (x) + ",height=" + (y);
    win=window.open(image,"image",z);
    }


    The first time I click on the link the function doesn't manage to get the width and the height of the image

    How can i solve this problem?

    thanks in advance
    Last edited by elektroman; June 7th, 2005 at 08:17 AM.

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured