Skip navigation
Currently Being Moderated

Calculation rule

Mar 19, 2013 4:57 AM

So what i would like to achieve is in my estimator, in the "Choice of coffin" section, in order for the Additional services' (drop down menu) to calculate, the radio button (above) for 'Simple Basic coffin' has to be selected. Basically those additional services are only available if the basic simple coffin is chosen.

 

I just cant get my head around how to restrict that drop down calculation from happening if simple basic not chosen.

 

http://www.milesmemorials.com/estimator.html

 

Any help appreciated!

 
Replies
  • Currently Being Moderated
    Mar 19, 2013 5:32 AM   in reply to Ness_quick

    You can disable <select> with disabled attribute.

     

    --

    Kenneth Kawamoto

    http://www.materiaprima.co.uk/

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 19, 2013 5:47 AM   in reply to Ness_quick

    Try this - add the following bold code to your javascript in the indicated location -

     

    cemetery_fee = Number(document.catwebformform22057.CAT_Custom_76931.value)

     

    zz=document.getElementById('CAT_Custom_76926_0').checked==true;if(zz) { document.getElementById('basicServices').style.display='block'; } else { document.getElementById('basicServices').style.display='none'; };

     

    Then change this -

     

    <select name="CAT_Custom_00010"

     

    to this -

     

    <span id="basicServices"><select name="CAT_Custom_00010"

     

    and this -

     

    <option value="545" >Limousine,Chapel visiting, Choice of date & time (&pound;545)</option>

                            </select></td>

     

    to this -

     

    <option value="545" >Limousine,Chapel visiting, Choice of date & time (&pound;545)</option>

                            </select></span></td>

     

     

    Finally, add this to your CSS -

     

    #basicServices {

    display:none;

    }

     

    See if that does what you want.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 19, 2013 6:49 AM   in reply to Ness_quick

    Why don't you post this in a separate thread? That way you can mark my answer as correct in this one!

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points