Jump to content

Archived

This topic is now archived and is closed to further replies.

jaymc

input type=file

Recommended Posts

I have this code shown below

[b]<input type='file' OnClick="alert('Hello');">[/b]

Obviously when clicking they should be hit with an alert, apparently it doesnt work with FILE boxes

Is their

1: Anyway to set an alert when clicking browse
2: Find out whether any file location has been added to the file box after browsing

Thanks

Share this post


Link to post
Share on other sites
Why use an alert box? Browse will trigger an appropriate dialog automatically.  And you can probably use an onchage event.

Share this post


Link to post
Share on other sites
Because I want to display an alert box (warning) when clicking browse

I also need to check to see if a file dir has been inputted to the file field

Share this post


Link to post
Share on other sites
Maybe you could try an onmouseup handler; and you'd have to do any checks onblur, but that be complicated.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.