I cannot calculate all total amout about this..How can i do it.??
here is coding:

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<script type="text/javascript">
function startCalc(){
  interval = setInterval("calc()",1);
	function calc(){
 		 one = document.order_form_10.dish1.value;
  		document.order_form_10.totaldish1.value = one * 10 ;
function startCalc2(){
  interval = setInterval("calc2()",1);

function calc2(){
  one = document.order_form_10.dish2.value;
    document.order_form_10.totaldish2.value = one * 15 ;
function startCalc3(){
  interval = setInterval("calc3()",1);

function calc3(){
  one = document.order_form_10.dish3.value;
  document.order_form_10.totaldish3.value = one * 20 ;
function startCalc4(){
  interval = setInterval("calc4()",1);

function calc4(){
  one = document.order_form_10.dish4.value;
  document.order_form_10.totaldish4.value = one * 25 ;
function startCalc5(){
  interval = setInterval("calc5()",1);
	function calc5(){
 		 one = document.order_form_10.dish5.value;
  		document.order_form_10.totaldish5.value = one * 30 ;
 function startCalc6(){
  interval = setInterval("calc6()",1);
	function calc6(){
 		 one = document.order_form_10.dish6.value;
		document.order_form_10.totaldish6.value = one * 35 ;

function stopCalc(){

function validateForm(theForm)
	if (!validRequired(theForm.username,"User Name"))
		return false;
	return true;
function validRequired(formField,fieldLabel)
	var result = true;
	if (formField.value == "")
alert('Please fill the"' + fieldLabel +'" part (cebit-xxxxxxx).');
		result = false;
	return result



<form name="order_form_10" action="order_form_10_rtn.asp" method="post">

 <center> <h4>SALES ORDER</h4></center>
  <table width="645" height="400" border="4" bordcolor="black" cellpadding="2" align=center>
      <td width="144" height="34"><strong>Product</strong></td>
      <td width="69"><strong>Quantity</strong></td>
      <td width="144"><strong>Total Price</strong></td>
      <td>Wedding Brooch</td>
        <input name="dish1" type="text" size="10" onFocus="startCalc();" 

      <td><input type="text" name="totaldish1"></td>
      <td>Kristal Brooch</td>
        <input name="dish2" type="text" size="10" onFocus="startCalc2();" 

      <td><input type="text" name="totaldish2"></td>
      <td>Kristal Brooch</td>
        <input name="dish3" type="text" size="10" onFocus="startCalc3();" 

      <td><input type="text" name="totaldish3"></td>
      <td>Kristal Brooch</td>
        <input name="dish4" type="text" size="10" onFocus="startCalc4();" 
      <td><input type="text" name="totaldish4"></td>
     <td>Kristal Brooch</td>
        <input name="dish5" type="text" size="10" onFocus="startCalc5();" 
      <td><input type="text" name="totaldish5"></td>
      <td>Kristal Brooch</td>
        <input name="dish6" type="text" size="10" onFocus="startCalc6();" 
      <td><input type="text" name="totaldish6"></td>

   <center> <label for="total"></label>
  <strong>Total Amout (RM): </strong></p>
  <label for="total2"></label>
  <input type="text" name="total" id="total2"></center>
<input type="reset" name="Reset" value="Clear">


What, in English (not code) are you doing?

Also, use functions to call 'setTimeout( function_not_string, millis )'

function do_foo() { /* does something here */ }

// wrong:
setTimeout( 'do_foo()', 1000 ); //string is bad

// right:
setTimeout( do_foo, 1000 ); // function is good

The function will be called after a lapse of approximately the millis you specify.

Debugging anything with a one milli interval is probably impossible. Start with 1000.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.