I have this code on my aspx page
<form><input type="text" name="upfile" required> <input type="submit" value="Upload File" onclick="...my code.." </form>
ie, I want the text input cannot be blank, so I put the word "required" in the input tag above (it is a HTML5 validation).
However, when I test the page, although the browser display the user need to input the text, the code I put in onclick still runs which is not I want. I want it runs only when all validation is done. I switched to onchange and onsubmit in submit button, the codes simply do not run even I input text. I switched to onsubmit within form tag, the code does not run even I input text..
What should be the correct event and where should I place the event ?
Pls help, thanks

Go to the complete details ...