Hi all, I'm a newbie of jQuery. I've tried to send post request by $.post(), and used to succeed. When I try to use $.post() this time, I get a strange problem. I'm trying to send request as below:
$.post('http://vhost/deng/commitment/save', {num:1, name:abc}, function(xml) { //something for processing xml }); 'vhost' is a virtual host on my apache server, and I send this request from a web page under 'localhost'. I cannot see any post request in Firebug. The request was not sent successfully. And I got some strange from apache access log, as below: "127.0.0.1 - - [10/Apr/2008:18:21:21 +0800] "OPTIONS /deng/commitment/save HTTP/1.1" 404 9245 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9b4) Gecko/2008030318 Firefox/3.0b4" You can see the OPTIONS method, I have no idea of that. Why I sent a post request, but it was treated as OPTIONS. But if I send request to some URL in 'localhost', it will be ok. I don't know how to solve it. It took me more than 2 hours, it's killing me. How can I solve this problem, or where can I find some clue? My jQuery is version 1.2.3. Thanks and regards, Huisi