justravis Posted August 20, 2007 Share Posted August 20, 2007 i'm just trying to check 1 select menu at this point...it doesnt even trigger <script src='intro.js'></script> <form method=post action=/programs/dmd/mentee/intro.pwr onSubmit='return validForm()'> <input name=required id=required type=hidden value='chan,subchan'> <label>How did you hear about Disability Mentoring Day?<br /> <select name='chan' onChange='showSubchan(this.value)'> <option value=''> Please choose. </option> <option value=2> San Diego Community College District </option> <option value=3> San Diego Unified School District </option> </select> <br /> <div id='selectSubchan'></div></label> <input name=next id=next type=submit value=Next> </form> javascript function validForm(form) { elem=document.getElementByID('chan'); if(elem.value == "Please Choose") { alert(helperMsg); elem.focus(); return false; } else { return true; } } Any thoughts? THANK YOU! Quote Link to comment Share on other sites More sharing options...
justravis Posted August 20, 2007 Author Share Posted August 20, 2007 made a few corrections: <script src='intro.js'></script> <form method=post action=/programs/dmd/mentee/intro.pwr onSubmit='return validForm()'> <input name=required id=required type=hidden value='chan,subchan'> <label>How did you hear about Disability Mentoring Day?<br /> <select name='chan' onChange='showSubchan(this.value)'> <option value=''> Please choose. </option> <option value=2> San Diego Community College District </option> <option value=3> San Diego Unified School District </option> </select> <br /> <div id='selectSubchan'></div></label> <input name=next id=next type=submit value=Next> </form> function validForm() { var elem=document.getElementById('chan'); if(!elem.value) { alert('chan'); elem.focus(); return false; } else { return true; } } Quote Link to comment Share on other sites More sharing options...
nogray Posted August 20, 2007 Share Posted August 20, 2007 I think you're missing the id from the select <select name='chan' add id='chan' Quote Link to comment Share on other sites More sharing options...
justravis Posted August 20, 2007 Author Share Posted August 20, 2007 yes, u r right!! I did forget the id attribute! - 1000 cool points for travis i think that oversight cost me almost a day!!!! 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.