I see the post request, but it is not ajax: the header is missing, and it is not listed in XHR section in firebug. Is there another way of disabling the submit action and turning it into ajax request? maybe that's my problem?
On Jul 3, 3:26 am, James <james.gp....@gmail.com> wrote: > Earlier when you said: > I have used firebug, and there is no sign of AJAX request. > > Did that mean there was no sign of the AJAX request firing, or no sign > of the X-Requested-With header? > Also try using a locally hosted version of jQuery 1.3.2 instead of > Google's. But I doubt that's the problem. > > On Jul 2, 1:50 pm, hadaraz <hada...@gmail.com> wrote: > > > I forgot to mention that on the same page I have $('#loadit').load('/ > > load/url/') and it works fine, so the problem is only with post. > > > On Jul 2, 5:32 pm, hadaraz <hada...@gmail.com> wrote: > > > > Nop, it is the same... > > > > On 2 יולי, 00:17, James <james.gp....@gmail.com> wrote: > > > > > Hmm... > > > > > What happens if you add: > > > > type: "POST" > > > > > in your AJAX options? > > > > > On Jul 1, 10:36 am, hadaraz <hada...@gmail.com> wrote: > > > > > > I have used firebug, and there is no sign of AJAX request. > > > > > > On the server side I use python, and yes, I'm checking for > > > > > 'HTTP_X_REQUESTED_WITH'. Maybe there is a problem with the jquery > > > > > 1.3.2 (which is what I use, linked from google ajax libs)? > > > > > > On Jul 1, 9:21 pm, James <james.gp....@gmail.com> wrote: > > > > > > > Have you tried using Firebug for Firefox to examine the headers of > > > > > > the > > > > > > AJAX request to be sure that it wasn't sent? Check that first. > > > > > > > You might be reading the headers incorrectly on the PHP side. Are > > > > > > you > > > > > > using: $_SERVER['HTTP_X_REQUESTED_WITH'] > > > > > > The beginning HTTP_ part is the tricky part. Make sure you have > > > > > > that. > > > > > > > On Jun 30, 9:52 pm, hadaraz <hada...@gmail.com> wrote: > > > > > > > > Posting data from a form using this function: > > > > > > > > $(function() { > > > > > > > $('#emailform').submit(function() { > > > > > > > $.ajax({ > > > > > > > url: '/post/url/', > > > > > > > dataType: 'json', > > > > > > > data: $('#emailform').serialize(), > > > > > > > success: function(rdata) { > > > > > > > $('#emailformmessage').text(rdata.message).show > > > > > > > ('slow'); > > > > > > > } > > > > > > > }); > > > > > > > }); > > > > > > > return false; > > > > > > > > }); > > > > > > > > the server doesn't detect an ajax call ('X-Requested-With' header > > > > > > > is > > > > > > > not sent). I tried forcing it with beforeSubmit and also with > > > > > > > ajaxSetup, but no go. > > > > > > > Any solutions to this problem? > > > > > > > > hadaraz-הסתר טקסט מצוטט- > > > > > -הראה טקסט מצוטט-