[jQuery] Submitting form via AJAX
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2912" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=188252715-12072006><FONT face=Arial size=2>Hi
guys,</FONT></SPAN></DIV>
<DIV><SPAN class=188252715-12072006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=188252715-12072006><FONT face=Arial size=2>I'm trying to
implement some AJAX in a form, using 1.0a version of Jquery.
</FONT></SPAN></DIV>
<DIV><SPAN class=188252715-12072006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=188252715-12072006><FONT face=Arial size=2>I have a couple of
questions: </FONT></SPAN></DIV>
<DIV><SPAN class=188252715-12072006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=188252715-12072006><FONT face=Arial size=2>- In principle, I've
read in the docs at <A href="http://proj.jquery.com">http://proj.jquery.com</A>
that the form plugin is included in this version, but formdata() or
serialize() function doesn't work.</FONT></SPAN></DIV>
<DIV><SPAN class=188252715-12072006><PRE class=wiki> $.param( $("#form").formdata())</PRE><PRE class=wiki><FONT face=Arial size=2>- Regarding to new way of calling AJAX functions ( $.ajax instead of $.post & $.get ):</FONT></PRE><PRE class=wiki><FONT face=Arial size=2>I'm trying to make this call</FONT></PRE><PRE class=wiki> $.ajax({<BR> url: "/ajax/ajax_process.phtml",<BR> type: "POST",<BR> data: $.param( $("#form").formdata() ),</PRE><PRE class=wiki> success: function(xml) {<BR> alert ( $("response", xml).text() );<BR> },<BR> error: function() {<BR> alert ("KO");<BR> }<BR> });</PRE><PRE class=wiki><FONT face=Arial size=2>But I cannot access the xml contents. What i'm doing wrong. Have been any changes in the use of this functions? How would be the correct way of serialize a form values, <BR>and later read the xml after processing it? Any online examples using 1.0a online version? </FONT></PRE><PRE class=wiki><FONT face=Arial size=2>Thanks a lot!</FONT></PRE><PRE class=wiki><DIV align=left><FONT face=Arial size=2>Albert Garcia</FONT></DIV><DIV align=left><FONT face=Arial size=2>OboLog » Tus pensamientos en red</FONT></DIV><DIV align=left><FONT face=Arial size=2><A href="http://www.obolog.com/">www.obolog.com</A></FONT></DIV><DIV align=left><FONT face=Arial size=2>______________________________________________</FONT></DIV><DIV align=left><FONT face=Arial size=2>Mi blog personal en <A href="http://obokaman.obolog.com/">http://obokaman.obolog.com</A></FONT></DIV></SPAN></PRE></DIV>
<STYLE>
<!--
A.special_link { TEXT-DECORATION:none; COLOR: #4e81c4}
A:hover { TEXT-DECORATION: underline }
A.special_link:hover { COLOR: #999999 }
A.brand { COLOR: #777777; FONT-SIZE: 7pt; TEXT-DECORATION: none }
.normal_txt { FONT-FAMILY: Verdana,Arial,fixed; FONT-SIZE: 8pt; COLOR: #4e81c4; }
.small_txt { FONT-FAMILY: Verdana,Arial,fixed; FONT-SIZE: 7pt; color:#777; text-align:justify; width:650px;}
.logotext { TEXT-DECORATION: none; FONT-SIZE: 10pt; COLOR: #ffffff; }
.main_table { FONT-FAMILY: Verdana,Arial,fixed; BORDER-RIGHT: #355D91 1px solid; BORDER-TOP: #ADC2DD 1px solid; BORDER-LEFT: #ADC2DD 1px solid; BORDER-BOTTOM: #355D91 1px solid }
-->
</STYLE>
</BODY></HTML>
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/