jQuery form serialize - empty string
Posted
by user137348
on Stack Overflow
See other posts from Stack Overflow
or by user137348
Published on 2010-04-07T09:43:03Z
Indexed on
2010/04/07
9:53 UTC
Read the original article
Hit count: 239
My html:
<script type="text/javascript">
$(function() {
$("#bt1").click(function() {
var f = $("#form1");
var formData = f.serialize();
alert(formData);
});
});
</script>
<div id="div1">
<form id="form1" action="/Home/Test1" method="post" name="down">
<div id="div2">
<input id="input1" type="text" value="2" />
</div>
</form>
</div>
<input type="submit" id="bt1" />
When I fire up the click event, formData is empty. I'm using jQuery 1.4.2.
© Stack Overflow or respective owner