|
|
Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
I have a data access page that I am wanting to add to my website. On this page I want to put a button that when pushed will do some small calculations (addition and subtraction) and then post these calculations into a series of text boxes.
I setup a test html document so that I can try to figure out how to do this (because I know nothing about html or java) and I can't get it to put anything in the text box. I know that it is processing the function because I have it set up to give an alert to me, but that's it. I've tried a couple of different things, but I know that it is just a syntax error on my part (like I said before, don't know html). Here is the code that I am using:
<html>
<head> <script> <!--
function calc() { dividend = 8; divisor = 4; myString = "The quotient is "; quotient = dividend*divisor
alert(myString + quotient);
}
--> </script> <meta name="GENERATOR" content="Microsoft FrontPage 6.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>New Page 1</title> </head>
<body> <form method="POST"> <p><input type="text" name="T3" size="20" ></p> </form> <form method="POST"> <p><input type="button" onclick="calc();" value="Button" name="B3"></p> </form> </body>
</html>
I know that the code (whatever it may be) goes after the alert but like I said I don't know how to write it. If anyone can help me out with this last little bit that I am missing then I would greatly appreciate it. Once I get that then I should be good to go.
Thanks again, Wes
|
|
|