开发者

After jquery post I can't read form values with coldfusion

I have a jquery post:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript" src="./js/jquery-1.4.3.min.js"></script>
<script type="text/javascript">
    $(document).ready(function() {
            $("#JqPostForm").submit(function(){
                    $.post("messages.cfm", $("#JqPostForm").serialize());
                    return false;
            });
    });
</script>
</head>
<body>
<form id="JqPostForm">
<p><label for="name_post">Name:</label><br />
<input id="name_post" type="text" name="name_post" /></p>
<p><input type="submit" value="Submit" /></p>
</form>
</body>
</html>

my code in messages.cfm

<cfoutput> #form.n开发者_如何学JAVAame_post#</cfoutput>

i got 500 Internal Server Error...

 Element NAME_POST is undefined in FORM.

but, if I go cfdebug section

Form Fields:
FIELDNAMES=NAME_POST
NAME_POST=John doe

firebug: Parameters application/x-www-form-urlencoded

name_post john doe

Source

name_post=john+doe

im using jquery 1.4.3 and coldfusion 7

Thanks

Plutarco


I delete this line in my application.cfc

<CFSET SetEncoding("FORM", "iso-8859-1") />

it works fine!

thanks

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜