Note that there are some explanatory texts on larger screens.

plurals
  1. POForm submit
    primarykey
    data
    text
    <p>I'm basically just trying to submit a form through AJAX and want to show the return of the processing PHP page. The PHP page just validates the input and shows either the errors that occured, or a thank you message to the user. Normally I wouldn't use ajax for it, but in this case the customers setup requires me to.</p> <p>As simple as that may sound, I can't get it to work.</p> <p>The jquery (1.4.2) code I'm using:</p> <pre><code>$(document).ready(function() { $('#subscription').submit( function() { var inputdata = $('#subscription').serialize(); alert(inputdata); $.post("process_form.php", inputdata, function(data) {alert(data);} ); }); }); </code></pre> <p>Firebug just shows:</p> <blockquote> <p>POST process_form - status: aborted</p> </blockquote> <p>Another curious observation is that the success handler is actually called, but no responseText is displayed. My apache logs show a 304 http message for the process form, after which it shows another line with statuscode 200 for the form, as if it was redirected back there, whether that is normal AJAX behaviour I don't know.</p> <p>W3C states <a href="http://www.w3.org/TR/XMLHttpRequest/" rel="nofollow noreferrer">here</a>: </p> <blockquote> <p>If the origin of the URL conveyed by the Location header is same origin with the XMLHttpRequest origin and the redirect does not violate infinite loop precautions, transparently follow the redirect while observing the same-origin request event rules. Otherwise, this is a network error.</p> </blockquote> <p>But I don't think my request violates any of those.</p> <p>Anyway, long story short: I'm stuck.</p> <p>Any help would be very much appreciated and off course I'd be happy to supply any further needed information.</p> <p>Thank you very much for your time.<br> All the best,<br> -G</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload