Question: Please, help me with javascript!!!? Hi!\nI want to create a form that:\n_ When I click on the checkbox " Don't give more info" ==> all of fields below the check box will be unable to fill in.\n\n_ If user don't click on the checkbox, they must fill all the fields below the check box, and the submit button will alert them to know which fill that they forgot to fill.\n\nPlease, help me the code in Javascript like this or give me any link about this tutorial. :)\n\nThanks you very very much.....:)

Answer: you'll get actual answers if you post what you have already written (even if it's just the html)\n\nnow all you'll get are sites to search!\n\nhttp://www.w3schools.com\n\nor use a search engine for the topic "javascript form checkbox hide required" will get you right to lots of examples!\n\n\n\nassuming your html is :\nform method="post" action="customer_checkout2.php">\n<input name="same" type="checkbox" id="same" value="checkbox">\n<input name="ordermain_Shipfirst" type="text" id="ordermain_Shipfirst">\n<input name="ordermain_Shiplast" type="text" id="ordermain_Shiplast">\n<input name="ordermain_Shipcompany" type="text" id="ordermain_Shipcompany">\n.....\n<input type=image name="Submit" value="Submit" src="../Images/Button/Continue_Checkout.jpg">\n\n\nthe simplest way is to add an onsubmit handler to the form\n\n<form ... onsubmit="return mysubmitfunction">\n\nwhere mysubmitfunction \nreturns true if the fields are entered correctly and false if they are not!\nfalse magically stops the submit from submitting!\n\nto do the checkbox, it's the onclick handler, inside there you \nmake the fields hidden or not depending on the value of the checkbox!\n\nthat should help you out... the rest is left for you to discover using google or yahoo search!
This question from the Yahoo Q&A forum is categorized in the topic: Education & Reference