I am trying to write a program that will prompt you to enter someone's name. Then it will take that name and send it to a different program where it will add that name to its database. Here is the code:
<!DOCTYPE html>
<html>
<body>
<form name="customerForm" action="" method="get">
First Name: <input type="text" name="firstname" /><br />
Last Name: <input type="text" name="lastname" /><br />
<input type="button" name="button" value="Add Customer" onClick="addCustomer(this.form)">
</form>
<script type="text/javascript">
function addCustomer(form)
{
var x = form.firstname.value;
var y = form.lastname.value;
var name = x+" "+y;
alert(name);
}
</script>
</body>
</html>
Currently I have the javascript function to put the name into an alert box to see if it worked.