jQuery AJAX request (Rails 3) gets redirected and returns empty message body (only with SSL)! -


I'm trying to manually declare the jQuery AJAX request as follows:

  $ ("#user_plan_id"). Change (function () {$ ("# plan_container"). Load ('/ plans'' this.value);});  

I have a "Rail .js" file in my railway, and "& lt;% = csrf_meta_tag%>".

I see from my log the request is being made on the server (though without authenticity token ... what does the rail? JS also do this?), But 302 (mile) , And in fact no data is provided.

Any thoughts?

EDIT: Now I see that the first request redirects, and the redirect is provided with the appropriate partial. However, the body of response (still on client-side) of respiration is still empty. I'm guessing that jQuery uses the first reaction and does not set up a listener for the redirect. How do I get around this?

In addition, another note: The requesting page is a HTTPS page.

My log says:

  got started for "/ plans / 221168073" on 127.0.0.1 on Tuesday 15 June 01:24:06 -0400 2010 Plan Controller Processing by HTML # is shown as HTML parameter: {"id" => "221168073"} DEPRECATION Warning: #request_uri is used. Use full path instead (redirected to http://vidfolia.com/plans/221168073) (which is called from users / registration / site / vidafoya / vendor / plugin / site / revision / lib / sol_requency. Done 302 found in full 1ms  

It turns out that if I turn off the SSL requirement of that page, then it works! I still do not know, though, though. So I think my question is: What is the solution?

Do you set one at any given point: Protocol somewhere on "HTC"?


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -