I have a rails backend and am testing the following jquery code:
var content = $("#notification_content").val(); var data = new Object(); data.content = content; $.ajax({ url: "/notifications/detect_type.json", type:"POST", data: data, success: function(result ){updateTypeDropDown(result)}});
This code works fine in Chrome and IE. However, in Firefox (using Firebug), I see the following: http: // localhost: 3000 / notifications / detect_type.json 406 Not acceptable
here is the firefox request in the log:
Processing NotificationsController # detect_type (for 127.0.0.1 on 2010-12-21 17:05:59) [POST] Parameters: {"Action" => "detect_type", "content" => "226 south emerson denver co 80209", "controller" => "notifications"} User Columns (2.0ms) SHOW FIELDS FROM users User load (37.4 ms) SELECT * FROM users WHERE ( users . id = '1') LIMIT 1 Completed in 58 ms (View: 1, DB: 40) | 406 Not acceptable [http: //localhost/notifications/detect_type.json]
Here is the chrome query in the log:
Processing NotificationsController # detect_type (for 127.0.0.1 on 2010-12-21 17:06:41) [POST] Parameters: {"action" => "detect_type", "content" => "226 south emerson 80209", "controller "=>" notification "}
Custom Columns (2.1ms) SHOW FIELDS FROM users
User load (30.4 ms)
SELECT * FROM users WHERE ( users . id = '1') LIMIT 1 Completed in 100 ms (view: 1, DB: 33) |
200 OK [http: //localhost/notifications/detect_type.json]
I'm at a dead end. Ideas?
source share