image size within an iframe

C

coolsti

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
 
C

coolsti

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top