I have a page with three frames on it(frNav,frMain and frOder). I have used this in the past with success but am failing on this attempt to retrieve the value of a textbox and pass it to a textbox in another frame. This script is in the <head> document in the frMain frame. Below is the script:
function calcnsend(prod_num, prod_rate){
quant=document.frmcalcnsend.prod_num.value;
totvalue=quant*prod_rate;
parent.frOrder.prod_id.value=totvalue;
}
Here is the form in the <body> of the same document in the frMain frame:
<form action="pricing.cfm" method="post" name="frmcalcnsend" id="frmcalcnsend">
<tr>
<td width="300"> #Widget</td>
<td width="150" align="center">
<table width="150" cellspacing="0" cellpadding="0" border="0">
<tr>
<td width="30" align="right">$</td>
<td width="120" colspan="2" align="right1.20 </td>
</tr>
</table>
</td>
<td><input type="text" name="a01a" size="5" onBlur="calcnsend('a01a','1.20');"></td>
</tr>
</form>
The frOrder frame has a textbox named a01a. Using the code above, when the onblur event is activated and a number is typed in the a01a textbox, it generates the error "document.frmcalcnsend.prod_num has no properties".
Any help would be appreciated.
Chris
Chris Scott
The Whole Computer Medical Systems
function calcnsend(prod_num, prod_rate){
quant=document.frmcalcnsend.prod_num.value;
totvalue=quant*prod_rate;
parent.frOrder.prod_id.value=totvalue;
}
Here is the form in the <body> of the same document in the frMain frame:
<form action="pricing.cfm" method="post" name="frmcalcnsend" id="frmcalcnsend">
<tr>
<td width="300"> #Widget</td>
<td width="150" align="center">
<table width="150" cellspacing="0" cellpadding="0" border="0">
<tr>
<td width="30" align="right">$</td>
<td width="120" colspan="2" align="right1.20 </td>
</tr>
</table>
</td>
<td><input type="text" name="a01a" size="5" onBlur="calcnsend('a01a','1.20');"></td>
</tr>
</form>
The frOrder frame has a textbox named a01a. Using the code above, when the onblur event is activated and a number is typed in the a01a textbox, it generates the error "document.frmcalcnsend.prod_num has no properties".
Any help would be appreciated.
Chris
Chris Scott
The Whole Computer Medical Systems