I think that will work also, but I prefer using the document.getElementById() function to avoid problems with different browsers...
-mac-
: Dear mac, I used this:
:
: <html>
: <head>
: <script type="text/JavaScript" Language="JavaScript">
: function TotalCost()
: {
: if (document.MainForm.BookNumber.value<1)
: {document.MainForm.Cost.value="NaN";}
: else {document.MainForm.Cost.value=document.MainForm.BookNumber.value*600+100}
: }
: </script>
: </head>
: <body>
: <input onblur=TotalCost(); onchange=TotalCost(); type="text" name="BookNumber" value="1">
: </body>
: </html>
:
: What's your idea?
:

-mac-
mailto:mac_doggie@hotmail.com
the Netherlands...