View Single Post
(#4 (permalink))
Old
tmiris's Avatar
tmiris tmiris is offline
Member
tmiris is on a distinguished road
 
Posts: 35
Join Date: Dec 2011
Location: nr Liverpool England
Default 05-01-2012, 02:56 PM

Building on what Mate has to say.... if you gave your x, y input textfields id attributes
eg id="x" id="y" you could then access them via
var x=document.getElementById("x").value;

You don't need to use the submit button to perform the addition, you can use any button,
and attach the add function to it, thus, in html...

<input type="button" id = "myAddButton" value="Add" onclick="add" />

(in fact you don't need form tags either, if you not sending user submitted data to your
server)

Last edited by tmiris; 05-01-2012 at 03:07 PM. Reason: addition
Reply With Quote