Complete novice here, but here's my question:
I am trying to code a simple 1 page example. I use a basic html page set up a couple of
test boxes to get numerical data and then using the button element with onclik= to call a function(parm1,parm2) to display the answer.
Issue I have is that when I click on the button, the page clears and then gives the answer. I do not want the page to clear but rather have the answer appear on the next line.
Could someone explain why the page clears? Snipet below...
Sample snipet:
form
.
.
.
input type="button" name="button1" value="Click here for your answer" onclik="function(num1,num2)"
/form
.
.
.
script type="text/javascript"
function function(num1,num2)
{
.
.
.
return (answer);
}
.
.
.
[ October 25, 2005: Message edited by: Jon-Paul Ward ]