I have the following code.
<script type="text/javascript">
$(document).ready(function () {
$("#submit").click(function (e) {
e.preventDefault();
/* Get some values from elements on the page: */
var values = $(this).serialize();
$.ajax({
url: "submit.php",
type: "post",
data: values
});
$("#dialog").dialog({modal: true, height: 200, width: 300 });
});
});
</script>
<body>
<form id="contactfrm">
<input type="text" name="fullname"/>
<input type="text" name="email"/>
<input type="text" name="phone"/>
<a href="" class="submit" id="submit">submit</a>
</form>
</body>
the only reason i am using a link is because a designer has designed the link button and wasn't able to do a submit button.
Now when i click the button it popsup the window but it never submits the form. I can't understand why this is happening?