Ajax request not working in IE, Rails 3

Hello

I have a below code in rails 3 which works fine on all other browsers
except IE

There is a remote form, on creation it passes the XHR request in all
other browsers but in IE it doesn’t passes XHR request and searches
for the HTML page,
thus sometime gives “Missing template error” and sometimes
“Unacceptable 406”

def create
@cars = Car.new(params[:car])
if request.xhr?
logger.info “#######################”
logger.info “##############Just checking”
end
render :template => ‘cars/create’
end

My new form is a remote form

  • form_for @car, :remote => true, :url => {:action => “create”} do |f|
    #car_errors
    %div
    %span.title
    %label Name :
    = f.text_field :name

In create.js.erb

<% if @car.save %>
redirect_to_index();
<% else %>
$("#car_errors").html("<%=
escape_javascript(error_messages_for(:car)) %>");
<% end %>

This error I am only getting in IE

On Wed, Mar 9, 2011 at 8:27 AM, vikas rao [email protected] wrote:

Hello

I have a below code in rails 3 which works fine on all other browsers
except IE

This sounds like an issue with IE. Google for you version of IE and AJAX
issues.

B.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs