image size within an iframe

Discussion in 'HTML' started by coolsti, May 13, 2005.

  1. coolsti

    coolsti Guest

    I am working on an application where a series of images, one at a time, is
    shown to the user along with some input fields so that the user can enter
    information about the image into a database. The trick here is that the
    images located on a client side DVD are not accessible to the scripts on
    the web server which are creating the html.

    To get around this, I have tried two approaches:

    1) using window.open to open up the image as another document in another
    window. Using a link like 'file://localhost/D:/....' works fine.

    2) using an iframe, and using javascript to switch images on command by
    changing the iframe's location.href property, again with the above type of
    link.

    The problem is that in case 1) above, the image nicely resizes when the
    new window is resized. In case 2 with the iframe, the image is not
    resized, and if it does not fit into the iframe, not all of the image can
    be seen at once.

    The iframe is the preferred solution, since everything is on one page,
    both the image and the input fields. Is there some way I can get the
    document to resize itself to fit into the iframe?

    Thanks,
    Steve
    coolsti, May 13, 2005
    #1
    1. Advertising

  2. coolsti

    coolsti Guest

    On Fri, 13 May 2005 12:48:29 +0200, coolsti wrote:

    > 1) using window.open to open up the image as another document in another
    > window. Using a link like 'file://localhost/D:/....' works fine.
    >
    > 2) using an iframe, and using javascript to switch images on command by
    > changing the iframe's location.href property, again with the above type of
    > link.


    Its been some hours and I have been doing some trying ...

    In the meantime I solved the original problem in another way. I found out
    that I can use a link like the above in an ordinary image tag (thought
    that this would not work before) and so the resizing issue of the image is
    no longer an issue.

    /steve
    coolsti, May 13, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gustavo
    Replies:
    0
    Views:
    84
    Gustavo
    Aug 25, 2003
  2. Daedalous
    Replies:
    3
    Views:
    653
    Daedalous
    Jan 16, 2004
  3. James Wallace
    Replies:
    1
    Views:
    91
    William Morris
    May 14, 2004
  4. Joe Attardi
    Replies:
    0
    Views:
    488
    Joe Attardi
    Jan 17, 2006
  5. DL
    Replies:
    3
    Views:
    105
    Thomas 'PointedEars' Lahn
    Apr 18, 2010
Loading...

Share This Page