Forum: Ruby on Rails IE 5.5 not sending params when it sends Ajax

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Bill W. (Guest)
on 2007-03-11 01:28
(Received via mailing list)
Greetings!

When a vistor enters my site, the first page submits via a
form_remote_tag that calls a method that uses responds_to to see if the
visitor has js enabled.

My problem is that IE5.5 is not sending anything but the controller and
action in the params hash.  IE6, IE7, and FF all send what they're
supposed to send.  It's right there, or not there, in the log.

IE5.5 entry:
  Parameters: {"action"=>"check_js", "controller"=>"create"}

IE6 entry:
  Parameters: {"creator"=>"patient", "commit"=>"Start",
"action"=>"check_js", "new_or_update"=>"new", "controller"=>"create"}

FF entry:
  Parameters: {"creator"=>"patient", "commit"=>"Start",
"action"=>"check_js", "new_or_update"=>"new", "controller"=>"create"}

I'm stumped, have Googled my a$$ off, and cannot figure out what might
be going on here or how to fix it.  Any ideas or info would be greatly
appreciated!

The form_remote_tag looks like:

<%= form_remote_tag(:url => {:action => 'check_js'}) %>
      <p><%= radio_button_tag "new_or_update", "demo", true %></p>
      <p><%= radio_button_tag "new_or_update", "new", false</p>
      <p><%= radio_button_tag "new_or_update", "update", false</p>
      <div><%= hidden_field_tag("creator", 'patient') %></div>
  <div> <%= submit_tag("Start", :class => 'submit-btn') %></div>
<%= end_form_tag %>

The method looks like:

def check_js
   respond_to do |wants|
      wants.html {redirect_to :action => 'sorry'}
      wants.js {
        if params[:new_or_update] == 'update'
          render :update do |page|
            page.redirect_to :action => 'choose_emrec'
          end
        elsif params[:new_or_update] == 'new'
          render :update do |page|
            page.redirect_to :controller => 'actor', :action =>
'edit_patient'
          end
        else #if params[:new_or_update] == 'demo'
          render :update do |page|
            page.redirect_to :action => 'explain_demo'
          end
        end
      }
   end
end

Any ideas?

Thanks,
Bill
Eden L. (Guest)
on 2007-03-11 04:55
(Received via mailing list)
form_remote_tag uses Prototype which isn't "supported" in IE 5.5:

  http://wiki.script.aculo.us/scriptaculous/show/Sup...

If you want this to work, you'll have to debug and patch up the Ajax
class yourself :(
Bill W. (Guest)
on 2007-03-11 06:10
(Received via mailing list)
Hi Eden,

eden li wrote:
>
> form_remote_tag uses Prototype which isn't "supported" in IE 5.5:

Thank you.  That's exactly what I needed to know.  I really appreciate
your
response.

Best regards,
Bill
This topic is locked and can not be replied to.