Error: Object does not support this property or method

wxdqz

New Member
Hi everybody,

I have a form with 3 textboxes:

DegrNo Where I ask the client to enter a number
DegrUnit This is a readonly box with the value a number
DegrTot This is also a readonly box

I want to multiply the value of DegrNo with the value of DegrUnit and store the result in DegrTot

The code is as below:

<script language = "JavaScript" type = "text/JavaScript">
<!-- // Hide this script from non-script browsers

var DegrNo = parseInt("document.Form1.DegrNo.value" ,10);
var DegrUnit = parseInt("document.Form1.DegrUnit.value" ,10);
var DegrTot;
function DegrTot (DegrNo,DegrUnit){ // Calculate total cost for degrees
DegrTot = DegrNo * DegrUnit;
document.Form1.DegrTot.value=DegrTot;
}
//--> // End of hide script
</script>

I call the function from the DegrNo textbox as follows:


<input type="text" name="DegrNo" size="6" value=http://www.webdeveloper.com/forum/archive/index.php/"0" onChange="DegrTot() " >

I get a runtime error: Object does not support this property or method.

What am I doing wrong? Your help will be appreciated.

Thanks,

Jan
 
Back
Top