Хочу получить ответ от vote.php т.е. все что там вывело.
пробую так:
CODE ( javascript):
скопировать код в буфер обмена
<head><script src="http://code.jquery.com/jquery-1.3.2.js" type="text/javascript"></script> <script src="https://github.com/malsup/form/raw/master/jquery.form.js" type="text/javascript"></script> </head> <div id="form_message" style="display:none"></div> <form action="vote.php" method="post" id="commentform"> <input type="text" name="eded" value=""><br> <input name="submit" onclick="commentpost(); return false;" id="submit" tabindex="5" value="ок" type="submit" /> </form> <script type="text/javascript"> function commentpost() { var sElem = document.getElementById("form_message"); var options = { target: "#form_message", url: "vote.php", dataType:script, success: function() { sElem.innerHTML=responseText; } }; // передаем опции в ajaxSubmit $("#commentform").ajaxSubmit(options); } </script> </head>
в чем проблема?(Отредактировано автором: 26 Марта, 2011 - 20:55:07)
|