Hi,
I have file upload and Custom Radio button(with Images) in the page
Requirement:
When the page load, both the file upload control and Custom Radio Buttons has to be enable. when I click on the Custom Radio buttons ,the File Upload will be disabled, when I click on the File Upload ,the Custom Radio buttons will be disabled.
Can any tell me how to do this with JavaScript?
Once check the screenshot
It's very Urgent to get the file
Enable/Disable fileupload control with Javascript
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Former memberPosted May 12, 2012, 5:55 AM EDT
<script language="javascript" type="text/javascript"> function ToggleState() { document.getElementById('FileUpload1').disabled = !document.getElementById("FileUpload1").disabled; return false; } </script><asp:FileUpload ID="FileUpload1" runat="server" /> <input type="button" id="button2" value="Toggle State" onclick ="javascript:ToggleState();" />