List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm

try http://www.google.com/search?q=javascript+help&sourceid=navclient-ff&ie=UTF-8&rlz=1B3GGGL_enAU252AU254

the list is Web Standards not a help desk.

Brett Patterson wrote:
I hate to ask another question about JavaScript, but I need help with ONE more thing, please?

*Using the following JS code in XHTML Transitional:*
function proc()
 {
 var num = document.heartSearch.hsQty.value*8.95;
 document.hSearchoutput.hsTotal.value = r2(num);
 }

function prc2()
 {
 var num = document.youKnow.cutSandHours.value*12.17;
 document.outme.soter.value = r2(num);
 }

function r2(n)
 {
 ans = n * 1000;
 ans = Math.round(ans /10) + "";
 while (ans.length < 3) {ans = "0" + ans;}
 len = ans.length;
 ans = ans.substring(0,len-2) + "." + ans.substring(len-2,len);
 return ans;
 }

*and the following HTML code in XHTML Transitional:*
<div id="oklastone">
<form action="" name="heartSearch">
<select name="hsQty" id="hsQty" onchange="proc()">
<option value="0">0</option>
<option value="3">3</option>
</select>
</form>
</div>
<div id="otherrecal">
<form action="" name="hSearchoutput">
<input type="text" name="hsTotal" id="hsTotal" value="0.00" />
</form>
</div>
<div id="meinga">
<form action="" name="youKnow">
<select name="cutSandHours" id="cutSandHours" onchange="prc2()">
<option value="1">1</option>
<option value="5">5</option>
<option value="6">6</option>
</select>
</div>
<div id="noca">
<form action="" name="outme">
<input type="text" name="soter" id="soter" value="0.00" />
</form>
</div>
<div id="costana">
<form action="" name="costAndTtl">
<input type="text" name="TtlCost" />
</form>
</div>

How would I get the last form to show the SUM of both the id="hsTotal" and the id="soter" text fields?

--
Brett P.

*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************


*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************

Reply via email to