![]() |
| |||||||
![]() | « Previous Thread | Next Thread » |
| | LinkBack | Thread Tools | Display Modes |
| |||
| 719-572-9400 719-638-3545 hi, I have a group of checkboxes like this Code: <input type="checkbox" name="chk12" id="chk12" value="Yes">Quote 12 <input type="checkbox" name="chk11" id="chk11" value="Yes">Quote 11 <input type="checkbox" name="chk10" id="chk10" value="Yes">Quote 10 <input type="checkbox" name="chk9" id="chk9" value="Yes">Quote 9 <input type="checkbox" name="chk8" id="chk8" value="Yes">Other <input type="textbox" name="chk8othertext" id="chk8othertext" value=""> if the user selects Other checkbox and doesnt enter a value in the other textbox then fire an alert here is my code Code:
if (document.frm1.chk12.checked == false && document.frm1.chk11.checked == false && document.frm1.chk10.checked == false && document.frm1.chk9.checked == false && document.frm1.chk8.checked == false )
{
alert ('You didn\'t choose any of the checkboxes!');
return false;
}
else
{
return true;
}
If(document.frm1.chk8.checked ==true)
{
if(document.frm1.chk8othertext.value =="")
{
alert("enter a value");
}
}
any idea todd |
| Sponsored Links |
| The Following User Says Thank You to Wolffy For This Useful Post: | ||
richyrich (June 19th, 2008) | ||
| ||||
| what do you mean not working? are you getting an error message?
__________________ Quote of the Month: Strife: As long as we have each other, we'll never run out of problems. Questions to Ponder: Should vegetarians eat animal crackers? iif([sarcasm]=true,iif([you have to ask]=true,"didn't work","ha ha ha"),"not sarcasm") copyright © 2008 sbenj69 |
| ||||
| Assuming that your code is in some Event Procedure, Wolffy is right. The way you have it, the first If statement either returns True or False, but in either case it returns, which means bye-bye, it's done. |
![]() |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| display problem checkbox | todd2006 | JavaScript Programming | 4 | May 30th, 2008 03:58 PM |
| Programmatically Add Item to Validation Summary | jmurrayhead | .Net | 0 | March 20th, 2008 09:41 AM |
| Sponsored Links |
| ASP.NET Resource Index a directory of ASP.NET tutorials, applications, scripts, assemblies and articles for the novice to professional developer. Free Web Directory Including Chats and Forums Resources, Offer automatic, instant and free directory submissions. | URLZ Web Directory URLZ Web Directory Free Web Directory - Add Your Link The Little Web Directory | Free Web Directory Pegasus free web directory is a free directory organised by categories. Web Directory & SEO Services dirroot web directory |