Link to home
Start Free TrialLog in
Avatar of LelloLello
LelloLello

asked on

My checkbox - input type="checkbox" name="intSave" value="55" disabled class="formWidget">

User generated imageUser generated imagePlease see attahced image registrationA and registrationB.

<li>
		  <label class="order">* Level A - after April 24, 2012 add $55</label>
		  <input type="checkbox" name="intSave" value="55" disabled class="formWidget">
		  <span class="details">+$55</span></li>

        <li>
		  <label class="order">* Level B - after April 24, 2012 add $45</label>
		  <input type="checkbox" value="45" disabled class="formWidget">
		  <span class="details">+$45</span></li>   
        

Open in new window


As you can see in RegistrationA.jpg my code is working fine but I don't know why when i choose optionB in RegistrationB my checkbock is not showing.

Could you please advise.

Thank you.
ASKER CERTIFIED SOLUTION
Avatar of Mohamed Magdy
Mohamed Magdy
Flag of Egypt image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of LelloLello
LelloLello

ASKER

Hello Modserv,

When the user select Level B,

Level B after 24 Should show in the checkbox not level A.
This box should show.
When you select  ( * )        B  $1000 *
This checkbox should show.. Level B - after April 24, 2012 add $45  +$45
Did you understand my question?
Here is my code

if (total == 0)
			{
				if (document.SubmitRegistration.intOption[i1].checked==true) 
				{
					//if (((i1 == 0) || (i1 == 1) || (i1 == 3)) && (todaydate <= discountdate))
					if  (todaydate > discountdate){
						if (i1 != 2 && i1 !=3 && i1!=4){
							document.SubmitRegistration.intSave.checked = true;	
						}else{
							document.SubmitRegistration.intSave.checked = false;							
						}
					}else{
						document.SubmitRegistration.intSave.checked = false;
					}
					total = document.SubmitRegistration.intOption[i1].value;
				}

Open in new window

I have to adjust the javascript if statment.
i was able to fix level A, with that script how i can add another script if for level B?

if (document.SubmitRegistration.intOption[i1].checked==true)
                        {
                              //if (((i1 == 0) || (i1 == 1) || (i1 == 3)) && (todaydate <= discountdate))
                              if  (todaydate > discountdate){
                                    if (i1 != 1 && i1 !=2 && i1 !=3 && i1!=4 && i1!=5){
                                          document.SubmitRegistration.intSave.checked = true;      
                                    }else{
                                          document.SubmitRegistration.intSave.checked = false;                                          
                                    }
                              }else{
                                    document.SubmitRegistration.intSave.checked = false;
                              }
                              total = document.SubmitRegistration.intOption[i1].value;
                        }