Ho uno script che mi fa la somma dei prodotti che ordino e nella casella del totale mi restituisce l'errore NaN, a cosa è dovuto?
Metto qui parte del codice della pagina relativo alla casella totale:
codice:Totale Ordine <input name="TotaleOrdine" type="text" id="TotaleOrdine" value="0" size="8" readonly="yes"> </td> </tr> </table> </div> <div align="center"> <Script Language="JavaScript"> <% If MyMaths1 <> "" Then %> function Totale_Categoria_1(){ document.MyOrder.TotaleCat1.value = <% = MyMaths1 %> } <% End If If MyMaths2 <> "" Then %> function Totale_Categoria_2(){ document.MyOrder.TotaleCat2.value = <% = MyMaths2 %> } <% End If If MyMaths3 <> "" Then %> function Totale_Categoria_3(){ document.MyOrder.TotaleCat3.value = <% = MyMaths3 %> } <% End If If MyMaths4 <> "" Then %> function Totale_Categoria_4(){ document.MyOrder.TotaleCat4.value = <% = MyMaths4 %> } <% End If If MyMaths5 <> "" Then %> function Totale_Categoria_5(){ document.MyOrder.TotaleCat5.value = <% = MyMaths5 %> } <% End If If MyMaths6 <> "" Then %> function Totale_Categoria_6(){ document.MyOrder.TotaleCat6.value = <% = MyMaths6 %> } <% End If If MyMaths7 <> "" Then %> function Totale_Categoria_7(){ document.MyOrder.TotaleCat7.value = <% = MyMaths7 %> } <% End If If MyMaths8 <> "" Then %> function Totale_Categoria_8(){ document.MyOrder.TotaleCat8.value = <% = MyMaths8 %> } <% End If If MyMaths9 <> "" Then %> function Totale_Categoria_9(){ document.MyOrder.TotaleCat9.value = <% = MyMaths9 %> } <% End If If MyMaths10 <> "" Then %> function Totale_Categoria_10(){ document.MyOrder.TotaleCat10.value = <% = MyMaths10 %> } <% End If If MyMaths11 <> "" Then %> function Totale_Categoria_11(){ document.MyOrder.TotaleCat11.value = <% = MyMaths11 %> } <% End If If MyMaths12 <> "" Then %> function Totale_Categoria_12(){ document.MyOrder.TotaleCat12.value = <% = MyMaths12 %> } <% End If If MyMaths13 <> "" Then %> function Totale_Categoria_13(){ document.MyOrder.TotaleCat13.value = <% = MyMaths13 %> } <% End If If MyMaths14 <> "" Then %> function Totale_Categoria_14(){ document.MyOrder.TotaleCat14.value = <% = MyMaths14 %> } <% End If If MyMaths15 <> "" Then %> function Totale_Categoria_15(){ document.MyOrder.TotaleCat15.value = <% = MyMaths15 %> } <% End If If MyMaths16 <> "" Then %> function Totale_Categoria_16(){ document.MyOrder.TotaleCat16.value = <% = MyMaths16 %> } <% End If If MyMaths17 <> "" Then %> function Totale_Categoria_17(){ document.MyOrder.TotaleCat17.value = <% = MyMaths17 %> } <% End If If MyMaths18 <> "" Then %> function Totale_Categoria_18(){ document.MyOrder.TotaleCat18.value = <% = MyMaths18 %> } <% End If If MyMaths19 <> "" Then %> function Totale_Categoria_19(){ document.MyOrder.TotaleCat19.value = <% = MyMaths19 %> } <% End If If MyMaths20 <> "" Then %> function Totale_Categoria_20(){ document.MyOrder.TotaleCat20.value = <% = MyMaths20 %> } <% End IF %> function Totale_Ordine(){ document.MyOrder.TotaleOrdine.value = <% If MyMaths1 <> "" Then Response.Write(MyMaths1) %> <% If MyMaths2 <> "" Then Response.Write(" + " & MyMaths2) %> <% If MyMaths3 <> "" Then Response.Write(" + " & MyMaths3) %> <% If MyMaths4 <> "" Then Response.Write(" + " & MyMaths4) %> <% If MyMaths5 <> "" Then Response.Write(" + " & MyMaths5) %> <% If MyMaths6 <> "" Then Response.Write(" + " & MyMaths6) %> <% If MyMaths7 <> "" Then Response.Write(" + " & MyMaths7) %> <% If MyMaths8 <> "" Then Response.Write(" + " & MyMaths8) %> <% If MyMaths9 <> "" Then Response.Write(" + " & MyMaths9) %> <% If MyMaths10 <> "" Then Response.Write(" + " & MyMaths10) %> <% If MyMaths11 <> "" Then Response.Write(" + " & MyMaths11) %> <% If MyMaths12 <> "" Then Response.Write(" + " & MyMaths12) %> <% If MyMaths13 <> "" Then Response.Write(" + " & MyMaths13) %> <% If MyMaths14 <> "" Then Response.Write(" + " & MyMaths14) %> <% If MyMaths15 <> "" Then Response.Write(" + " & MyMaths15) %> <% If MyMaths16 <> "" Then Response.Write(" + " & MyMaths16) %> <% If MyMaths17 <> "" Then Response.Write(" + " & MyMaths17) %> <% If MyMaths18 <> "" Then Response.Write(" + " & MyMaths18) %> <% If MyMaths19 <> "" Then Response.Write(" + " & MyMaths19) %> <% If MyMaths20 <> "" Then Response.Write(" + " & MyMaths20) %> if (document.MyOrder.TotaleOrdine.value != 0){ document.MyOrder.Ordine.disabled = false } } </script>

Rispondi quotando
