Upload only when submit button is pressed
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Arya_Bhatta
Posted On:   Tuesday, March 23, 2004 11:19 AM

I am uploading a file from the browser. The problem is, it uploads even if the cursor is in the text field where the file was selected and the user presses enter. I want it to upload only when submit button is pressed.Can anyone suggest a solution for this?

Re: Upload only when submit button is pressed

Posted By:   Christopher_Koenigsberg  
Posted On:   Tuesday, March 23, 2004 12:50 PM

One way I learned, from searching this site, is to change the "submit button" (type="submit") to just an ordinary button, and have an onclick handler that submits the form. If there is no submit button on the form, then hitting Enter won't submit the form anymore.

About | Sitemap | Contact