C
coolsti
I need some help here. I am making an application which allows a user to
look at a series of picture files one at a time, and enter the outcome of
various visual tests to a database. The application is based on mysql and
php on a remote server, and is accessed by the user via a web browser,
primarilly IE.
The image file names are built up by the server side php scripts, and so a
URL for the image file is created, but the file itself is located on a
local drive on the client machine (DVD drive). So the server side php has
no access to the picture files.
I made version 1 of this application with the test input fields and
buttons to switch to next images, etc., on a main browser page, and used
window.open to open the image file in a pop up window. This works fine,
using the correct link, e.g. staring with 'file://localhost/D:/ etc.'.
But this is irritating because the input field and the image to inspect
are on two separate windows - I would like to integrate them into one
window.
I am now trying to do this with an iframe to hold the image. Again this
works in that I can load different images via javascript by changing the
location.href property of the iframe, and again using a link as above.
However, I do not have any control of the size of the iframe, which does
not match the size of the image.
Is there any way to get control of either the size of the image? For
example to have the image loaded into the iframe but scaled to the size of
the iframe?
Or is there a way via javascript once the page is on the browser to
control the size of the iframe?
Getting a hold of iframe properties is confusing to me. I change the
location using
window.frames['ifrm2'].location.href = link;
where ifrm2 is the name given to the iframe and link is a variable set to
the url, e.g. 'file://localhost ....'. But how do I get a hold of the
width or height? Microsoft talks about using something like
document.all. as a starter, but nothing I try lets me get access.
Thanks for any help!
steve, Denmark
look at a series of picture files one at a time, and enter the outcome of
various visual tests to a database. The application is based on mysql and
php on a remote server, and is accessed by the user via a web browser,
primarilly IE.
The image file names are built up by the server side php scripts, and so a
URL for the image file is created, but the file itself is located on a
local drive on the client machine (DVD drive). So the server side php has
no access to the picture files.
I made version 1 of this application with the test input fields and
buttons to switch to next images, etc., on a main browser page, and used
window.open to open the image file in a pop up window. This works fine,
using the correct link, e.g. staring with 'file://localhost/D:/ etc.'.
But this is irritating because the input field and the image to inspect
are on two separate windows - I would like to integrate them into one
window.
I am now trying to do this with an iframe to hold the image. Again this
works in that I can load different images via javascript by changing the
location.href property of the iframe, and again using a link as above.
However, I do not have any control of the size of the iframe, which does
not match the size of the image.
Is there any way to get control of either the size of the image? For
example to have the image loaded into the iframe but scaled to the size of
the iframe?
Or is there a way via javascript once the page is on the browser to
control the size of the iframe?
Getting a hold of iframe properties is confusing to me. I change the
location using
window.frames['ifrm2'].location.href = link;
where ifrm2 is the name given to the iframe and link is a variable set to
the url, e.g. 'file://localhost ....'. But how do I get a hold of the
width or height? Microsoft talks about using something like
document.all. as a starter, but nothing I try lets me get access.
Thanks for any help!
steve, Denmark