Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    New to the CF scene
    Join Date
    Nov 2003
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    javascript issue w/ IE

    Hello,
    I have made a basic javascrpt math function to add up some checkboxes
    Unfortunately it does not seem to work in IE (PC). I have used it successfully on Firefox (Mac) and Safari (mac), but it is a no go on IE. It is the section of the following page (http://fuzefit.com/enroll/signup.html) where TUITION prices are added 2/3 the way down. The basic formula result (total) works but if you click "add elective classes" which does a little extra math, it does not compute using IE (total2, total3, total4).

    Any thoughts? Make Sense?

    +++++++++++
    The little script that figures the extra math
    Code:
    <script language="javascript">
    function doCalculate()
    {
    //with document.ENROLL.myForm --> oops!
    with(document.ENROLL)
    {
    total2.value = Math.round(total.value - 149);
    total3.value = Math.round(total2.value * 1.1);
    total4.value = Math.round(total3.value * 1 + 149);
    }
    }
    </script>
    
    
    +++++++++++++
    
    The code for the main table adding the checkboxes:
    
    
    
    <fieldset>
    <dl>
    <table width="100&#37;" border="0" cellpadding="3">
    <tr>
    <td height="28" colspan="2" bgcolor="#C7D6F2"><div align="center"><strong>FUZE TUITION &ndash; Effective September, 2008</strong> - you may select multiple options </div></td>
    </tr>
    <tr></tr>
    <tr>
    <td width="50%" bgcolor="#F8FCE8"><p>
    <input name="box" type="checkbox" id="box" value="149" />
    <strong>Club Membership $149</strong> (One time and one per family),<br />
    <input name="box" type="checkbox" id="box" value="-50" />
    <strong class="boldtext">I have a coupon for eNrollment</strong> ( a $50 value)</p> <label></label></td>
    <td width="50%" bgcolor="#F8FCE8">&nbsp;</td>
    </tr>
    <tr>
    <td width="54%" bgcolor="#FFCC00"><div align="center"><strong class="boldtext"> 3-day-a-week schedule</strong></div></td>
    <td width="46%" bgcolor="#FFFF66"><div align="center"><strong class="boldtext"> 2-day-a-week schedule</strong></div></td>
    </tr>
    <tr>
    <td align="center" bgcolor="#FFCC00"><strong class="boldtext">GOLD/ Core classes </strong> <strong><u><br />
    Month-Month:</u></strong></td>
    <td align="center" bgcolor="#FFFF66"><strong class="boldtext">GOLD/ Core classes </strong><strong><u><br />
    Month-Month:</u></strong></td>
    </tr>
    <tr>
    <td><dd>
    <input id="platinum_1" name="box" type="checkbox" value="159" />
    $149 &ndash; 1st kid </dd></td>
    <td bgcolor="#E9FADE"><dd>
    <input id="Gold_1" name="box" type="checkbox" value="129" />
    $119 &ndash; 1st kid</dd></td>
    </tr>
    <tr>
    <td><dd>
    <input id="platinum_2" name="box" type="checkbox" value="149" />
    $139 &ndash; 2nd kid</dd></td>
    <td bgcolor="#E9FADE"><dd>
    <input id="Gold_2" name="box" type="checkbox" value="119" />
    $109 &ndash; 2nd kid</dd></td>
    </tr>
    <tr>
    <td><dd>
    <input id="platinum_3" name="box" type="checkbox" value="129" />
    $129 &ndash; 3rd kid +</dd></td>
    <td bgcolor="#E9FADE"><dd>
    <input id="Gold_3" name="box" type="checkbox" value="99" />
    $99 &ndash; 3rd kid +</dd></td>
    </tr>
    <tr>
    <td align="center" bgcolor="#FFCC00"><span class="boldtext"><strong>platinum</strong></span><strong><br />
    <u> SAVE 15% w/ 3-months prepaid (2 yr. price guarantee):</u>&nbsp;</strong></td>
    <td align="center" bgcolor="#FFFF66"><span class="boldtext"><strong>platinum</strong></span><u><strong><br />
    SAVE 15% w/ 3-month prepaid (2-yr. price guarantee):</strong></u></td>
    </tr>
    <tr>
    <td><dd>
    <input id="3m3_1" name="box" type="checkbox" value="387" />
    $129 &ndash; 1st kid</dd></td>
    <td bgcolor="#E9FADE"><dd>
    <input id="3m2_1" name="box" type="checkbox" value="297" />
    $99 &ndash; 1st kid</dd></td>
    </tr>
    <tr>
    <td><dd>
    <input id="3m3_2" name="box" type="checkbox" value="357" />
    $119 &ndash; 2nd kid</dd></td>
    <td bgcolor="#E9FADE"><dd>
    <input id="3m2_2" name="box" type="checkbox" value="267" />
    $89 &ndash; 2nd kid</dd></td>
    </tr>
    <tr>
    <td><dd>
    <input id="3m3_3" name="box" type="checkbox" value="297" />
    $99 &ndash; 3rd kid+</dd></td>
    <td bgcolor="#E9FADE"><dd>
    <input id="3m2_3" name="box" type="checkbox" value="237" />
    $79 &ndash; 3rd kid+</dd></td>
    </tr>
    <tr>
    <td align="center" bgcolor="#FFCC00"><span class="boldtext"><strong>diamond</strong></span><u><strong><br />
    SAVE 25% w/ 12-month prepaid (2-yr. price guarantee):</strong></u></td>
    <td align="center" bgcolor="#FFFF66"><span class="boldtext"><strong>diamond</strong></span><u><strong><br />
    SAVE 25% w/ 12-month prepaid (2-yr. price guarantee):</strong></u></td>
    </tr>
    <tr>
    <td><dd>
    <input id="6m3_1" name="box" type="checkbox" value="1308" />
    $109 &ndash; 1st kid (only $11 per class)&nbsp;</dd></td>
    <td bgcolor="#E9FADE"><dd>
    <input id="6m2_1" name="box" type="checkbox" value="1068" />
    $89 &ndash; 1st kid</dd></td>
    </tr>
    <tr>
    <td><dd>
    <input id="6m3_2" name="box" type="checkbox" value="1188" />
    $99 &ndash; 2nd kid</dd></td>
    <td bgcolor="#E9FADE"><dd>
    <input id="6m2_2" name="box" type="checkbox" value="948" />
    $79 &ndash; 2nd kid</dd></td>
    </tr>
    <tr>
    <td><dd>
    <input id="6m3_3" name="box" type="checkbox" value="1068" />
    $89 &ndash; 3rd kid+</dd></td>
    <td bgcolor="#E9FADE"><dd>
    <input id="6m2_3" name="box" type="checkbox" value="828" />
    $69 &ndash; 3rd kid+</dd></td>
    </tr>
    <tr>
    <td bgcolor="#FFCC00" class="billets"><span class="boldtext">TOTAL AMOUNT DUE</span>:<span class="boldtext"> $</span>
    <input name="total" type="text" id="total" value="0" /></td>
    <td bgcolor="#FFCC00"><span class="billets">
    <input name="total2" type="text" id="total2" value="0" size="1" />
    </span></td>
    </tr>
    <tr>
    <td bgcolor="#FFCC00"><span class="billets">
    <span class="boldtext">
    <input name="button" type="button" onclick="doCalculate()" value="Add Elective Classes" />
    </span> Elective Class Package
    
    </span></td>
    <td bgcolor="#FFCC00"><span class="billets">
    <input name="total3" type="text" id="total3" value="0" size="1" />
    </span></td>
    </tr>
    <tr>
    <td bgcolor="#FFCC00"><span class="billets">
    <span class="boldtext">TOTAL AMOUNT DUE</span>:<span class="boldtext"> $</span>
    <input name="total4" type="text" id="total4" value="0" />
    </span></td>
    <td bgcolor="#FFCC00">&nbsp;</td>
    </tr>
    </table>
    <br />
    </dl>
    </fieldset>
    +++++++++++++
    Last edited by Basscyst; 10-02-2008 at 12:19 AM.


 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •