Your selector is for an ID: $('#autoSumForm')
But your form has no ID: <form name="autoSumForm"
action="posttime.php" method="post">
Try adding an ID to the form:
<form name="autoSumForm" id="name="autoSumForm" action="posttime.php"
method="post">
--Karl
____________
Karl Swedberg
www.englishrules.com
www.learningjquery.com
On Jan 12, 2010, at 9:49 AM, Seth wrote:
Hello,
I'm trying to use this method to process a form and return an alert
without navigating to a new page for the form processing.
http://jquery.malsup.com/form/#getting-started
I have this in my <head> statement:
<script type="text/javascript" src="js/jquery-1.3.2.js"></script>
<script type="text/javascript" src="js/jquery.form.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#autoSumForm').ajaxForm(function() {
alert("Thank you for your comment!");
});
});
</script>
And this is the form:
<form name="autoSumForm" action="posttime.php" method="post">
...
<input type="submit" name="submit" id="submit" value="Submit" />
</form>
When I click the submit button though, it takes me to posttime.php,
and doesn't give the alert.
What did I do wrong?