| <html> |
| <head> |
| <title>Testing disabling file input</title> |
| |
| <script language="JavaScript" type="text/javascript"> |
| <!-- |
| function checkboxClicked(element) { |
| if (element.checked) { |
| document.getElementById("file_input").disabled = false; |
| } else { |
| document.getElementById("file_input").disabled = true; |
| } |
| } |
| //--> |
| </script> |
| </head> |
| <body> |
| <form> |
| <table> |
| <input name="attach_screenshot" type="checkbox" onClick="checkboxClicked(this);"> |
| <b>Attach File</b><br><br> |
| Select File: |
| <input id="file_input" name="thumbnail_file" type="file" disabled="true"><br> |
| </form> |
| </body> |
| </html> |