I'm using a simple bit of javascript to popup a prompt for user input which is posted back to a php script.
The HTML form is as follows:
Code: Select all
<form action="test.php" method="post" name="contactForm" id="contactForm">
<p><input name="customerid" id="customerid" type="text" size="30" value="Input Your Customer ID" /></p>
<p><input type="submit" id="submit" name="submit" value="Send" /></p>
</form>In my javascript I have the following which I thought determined the data sent back and to where it is sent?
Code: Select all
$.ajax({
type: "POST",
url: "test.php",
data: "customerid=" + customerid,
error: function() {
$('.error').hide();
$('#sendError').slideDown('slow');
},
success: function () {
$('.error').hide();
$('.success').slideDown('slow');
$('form#contactForm').fadeOut('slow');
}
});Thanks.