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 process 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>
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
DavidF - 28 Sep 2006 17:37 GMT
If you are indeed using Publisher to produce your site, what you are trying
to do may be beyond what can be done with Publisher forms. If you are using
FrontPage, then perhaps posting this in the FrontPage newsgroup would be a
good idea. Reference: Publisher web publication forms 101
http://msmvps.com/blogs/dbartosik/archive/2006/01/07/80564.aspx
DavidF
>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
[quoted text clipped - 50 lines]
> Thanks again,
> Wes