Skip to main content

Bug Tracker

Side navigation

#8261 closed bug (worksforme)

Opened February 13, 2011 12:50PM UTC

Closed February 13, 2011 06:02PM UTC

Last modified February 13, 2011 06:46PM UTC

jQuery.post does not work in 1.5

Reported by: novakg Owned by:
Priority: low Milestone: 1.next
Component: ajax Version: 1.5
Keywords: Cc:
Blocked by: Blocking:
Description

I'm trying the examples from http://docs.jquery.com/Tutorials:Getting_Started_with_jQuery and found that the AJAX post function does now work:

     $.post("rate.php", {rating: $(this).html()}, function(xml) {
       // format and output result
       $("#rating").html(
         "Thanks for rating, current average: " +
         $("average", xml).text() +
         ", number of votes: " +
         $("count", xml).text()
       );
     });

As I can see in FireBug, it does an OPTIONS call instead of a POST call.

It works fine in previous versions. It affect jQuery 1.5 only.

OS: Kubuntu 10.04

Browsers: FF 3.6.13, Opera 11.01, Google Chrome 5.0.375.126,

(I haven't tried on IE)

Attachments (0)
Change History (3)

Changed February 13, 2011 06:02PM UTC by snover comment:1

_comment0: `$.post` works fine for me. OPTIONS indicates you are attempting to perform a cross-site request, which is not supported.1297620171224138
resolution: → worksforme
status: newclosed

$.post works fine for me. OPTIONS indicates you are attempting to perform a cross-site request, which is not supported. If you can provide an actual, reproducible testcase, please feel free to comment again.

Changed February 13, 2011 06:40PM UTC by jitter comment:2

component: unfiledajax
priority: undecidedlow

Please read How to report bugs in order to provide a most useful bug report and make sure to include a test case (on http://jsfiddle.net) which reproduces your issues.

Changed February 13, 2011 06:46PM UTC by novakg comment:3

You are right, I was trying to do a cross-site request. This must be the problem.