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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Browse Button???

Status
Not open for further replies.

djjamz102

Programmer
Apr 20, 2008
3
Need help on this..

I have a browse button using <input type="file"> and a submit button using <input type="submit">. By default the submit button is disabled unless the browse button is click then open a new browse window to browse a file at the same time submit button is enabled. When the time the browse window is canceled or closed i want the submit button to be disabled again just the default. How can I do this?
 
You could periodically check the value of the file input to see if it is an empty string, and if so, disabled the button.

Use "setInterval" or "setTimeout" for this, depending on your needs.

Hope this helps,
Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
How can I do this? Any example please..Thank you!
 
I gave you the commands you needed, but I'm not going to write your code for you if you're not even goibg to bother trying for yourself. How about you do some research into those commands using Google.

If you get stuck, come back and post your code... but don't expect it to be handed to you on a platter.

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Can we add an onclick event on a type="file"????.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top