...

View Full Version : Check if true help



Daman
12-11-2006, 01:28 PM
Hi everyone,

I have put together the code below for a form I am building and now I need some assistance with a new function. I would like for certain radio buttons to be auto selected if another is checked. How do I accomplish this?

Thanks! :thumbsup:

//-->Disable radio buttons
function Disab (val) {
if(val=="1")
{
skiday07.rental[0].disabled=false;
skiday07.rental[1].disabled=false;
skiday07.lessons[0].disabled=false;
skiday07.lessons[1].disabled=false;
skiday07.skill_level[0].disabled=false;
skiday07.skill_level[1].disabled=false;
skiday07.skill_level[2].disabled=false;
skiday07.skill_level[3].disabled=false
}

if(val=="2")
{
skiday07.rental[0].disabled=true;skiday07.rental[0].checked=false;
skiday07.rental[1].disabled=true;skiday07.rental[1].checked=false
skiday07.lessons[0].disabled=true;skiday07.lessons[0].checked=false;
skiday07.lessons[1].disabled=true;skiday07.lessons[1].checked=false;
skiday07.skill_level[0].disabled=true;skiday07.skill_level[0].checked=false;
skiday07.skill_level[1].disabled=true;skiday07.skill_level[1].checked=false;
skiday07.skill_level[2].disabled=true;skiday07.skill_level[2].checked=false;
skiday07.skill_level[3].disabled=true;skiday07.skill_level[3].checked=false
}
}

Mr J
12-11-2006, 01:56 PM
Can you be more specific

Daman
12-11-2006, 02:03 PM
If you go to this link http://invites.fasken.com/skiday_07/rsvp.html
and click on "Will you be attending Ski Day?" Yes or No you will notice how they altrernate between enable and disable of the feilds below. When you select NO I want the feilds below to be auto check NO at the same time as they are disabled.

Hope this makes sense. :)

Daman
12-11-2006, 02:40 PM
:rolleyes: Nevermind everyone. I apologize. Didnt realize the answer was right there in front of me. I am very new to this. I appreciate your help.:D



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum