Thursday, March 10, 2005 02:35 AM
This won't work in Firefox, or other newer Mozilla clients because of security restrictions, but it will work in all IE versions... What you can do is the following (in your )
This script just checks 5 times a second whether the value in the input field has changed, if so it attempt to load it.
Note that you'll have to use the correct ID's. The INPUT field representing the file should have the same ID as the first getElementById, and the previewImg should be the ID of the image element you want to put the preview in.. for example: .
because of security restrictions this will not work in Gecko clients (firefox, mozilla), and might not be supported anymore in new IE versions. There is no other easy way to accompish this.