I have the following issue.
I have an aspx file upload input that must only show the file dialog if certain text field has a value, otherwise I must simply show an alter saying to fill the field.
I cannot use jquery.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The event object has a preventDefault function that you can use to stop the default from continuing. Using this you can attach a click event to your file upload which will fire upon trying to select a file. From there you can check the value of your text input and return/stop the default of the file element.
Note: Only tested this in Chrome.