Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Catching an event after a "browse" of a file field

Status
Not open for further replies.

onirike

Programmer
Aug 3, 2000
91
CA
Hi!

I got this problem and I would like to have help to solve it: I want to catch an onChange event on a file field. It seems that when the user select a file using the browse button the onChange event is not created. Any idea how I could know that my file field was modified?

Thx for you help
Chris [sig][/sig]
 
This works for me in IE 5.5 but does not work when I click the Browse button in NN 6 (though tabbing after changing does work). Sounds like a problem with NN. There may be a work around though using a "watch" function perhaps with a setInterval.

Good luck,
Rob

Code:
<html>
<body>
 <input type=file id=filFile onChange=&quot;alert('You changed the file to ' + this.value + '.');&quot;>
 <br>
 <input type=text id=txtEdit>
</body>
</html>
[sig][/sig]
 
Hi!

Thx for your help but that is not working in IE 5.0.
I dont really care about NN since we are only developping with IE 5.0 here.

I'll try to explore your secondd solution that use a &quot;watch&quot; function.

Thx
Chris

P.S.: If anyone else got any idea dont hesitate to post it here [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top