0
私はajaxでフォームを送信しようとしています。ここで私は、私はそのが正しくのみの送信方法、ことを見た放火犯とポスト変数をチェックすると、私の完全なコードフォームを送信するAjaxが定義されていないエラーを返します
<?php
$wparent = "123";
$method = "sms";
?>
<script type="text/javascript">
$(document).ready(function(){
$("#post_<?php echo $wparent;?>").click(function(){
$('#parentpost-<?php echo $wparent;?>').html('Loading.....');
$("#parentpost-<?php echo $wparent;?>").load("<?php echo SITE_URL;?>new_ajax/post_reply.php", {message:$("[name=replynote]").val(), method:$("[name=method]").val(), parent:$("[name=parent]").val()}); //end
}); // end of the main click function
});
</script>
<?php
echo "<textarea name='replynote' ></textarea>";
echo "<input type=\"submit\" class=\"post_button\" id=\"post_$wparent\" value=\"post\" />";
echo "<input type=\"button\" class=\"cancel_button\" value=\"Cancel\" />";
?>
<input type='hidden' name='parent' value='<?php echo $wparent;?>' />
<input type="hidden" name="method" value="<?php echo $method;?>" />
です。他のすべての値は未定義として送信されます。私は今までエラーを見つけることができませんでした。
これらのコードを理解する方法凝灰岩:( –