ballouta Posted May 2, 2009 Share Posted May 2, 2009 Hello I have a simple html form, one checkbox and one upload (file) control I want to disable the upload control is the checkbox is NOT selected (ticked) please help thank you Quote Link to comment Share on other sites More sharing options...
Ken2k7 Posted May 2, 2009 Share Posted May 2, 2009 Can you post some HTML please? Quote Link to comment Share on other sites More sharing options...
ballouta Posted May 2, 2009 Author Share Posted May 2, 2009 <form id="form1" action="edit_save.php" method="post" enctype="multipart/form-data"> <p dir="ltr"><input type="checkbox" name="replace" value="replace" /> I want to replace the current thumb</p> <p dir="ltr"> <p dir="ltr"> <input name="new_image" id="new_image" size="30" type="file" /></p> </p> <p dir="ltr"><input type="submit" value="Save" name="B1"></p> </form> Quote Link to comment Share on other sites More sharing options...
Ken2k7 Posted May 2, 2009 Share Posted May 2, 2009 Add an onclick event to the checkbox. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.