I am trying to make a rental calculator that adjusts the rent amount based on lenght of stay for my business and web site.
I just started today. Have not touched a piece of code in my life.
I am using a you tube video which shows me how to make a simple calculator and then I was going to build up from there.
sadly I am stuck even on building the simple calculator.
I cannot find out why my calculation will not work. Posting out of desperation before I abandon ship. Been at this for 3 - 4 hrs now and no luck.
Code posting below.
Code:<html> <head> <center><h1> Rental Calculator</h1></center> <script language=”JavaScript”> function writeText (form) { var rent=form.a.value; var two=form.b.value; Form.c.value = rent*two } </script> </head> <body> <center> <form name="myform"> Enter Rental Rate <br> <INPUT TYPE="text" Name="a" value=""><p> <br> Enter amount of time:<br> <INPUT TYPE="text" name="b" Value=""><p> <br> Total rental fee:<br> <INPUT TYPE="text" Name="c" value=""><p> <br> <INPUT TYPE="button" Name="buttonone" VALUE="display rent" onClick="writeText(this.form) "> <br> <INPUT TYPE="button" value="Click Me" name="button1"onclick="writeText(this.form)"> </center> </body> </html>


Reply With Quote
Bookmarks