Hi I have the code @service_desk_resolution=ServiceDeskResolution.find @sd_resolution_id @sd_resolv=ServiceDeskResolutionEffort.new @ret_val=@sd_resolv.checkdata(@sd_effort) error_value=0 respond_to do |format| @error_message='''' @ret_val.each do |val| if val==''nonnumeric'' @error_message=@error_message+''<br>''+''Please enter the numeric value for effort.''+''<br>'' error_value=1 end end if @sd_ticket.service_desk_cis.empty? @error_message=@error_message+''<br>''+''No associated CIs.''+''<br>'' error_value=1 end if error_value==1 format.js do #here get IE6 problem puts ''in format.js'' render :action => ''sd_resolution_range_nonnumeric_ci_check.rjs'' end format.html do puts ''in error else part format.html'' flash[:notice]=@error_message redirect_to :action => ''define_sd_resolution_ui'',:id => params[:id] end And I am calling the same from both ajax and normal way(ie link_to and link_to_remote)..It is working properly in Firefox..But when I checked in IE6 what happens is if the clicked link is link_to then also it ennters to format.js instaed of format.html And I can''t figure out why this happens in IE6.Please help Thanks in advance Sijo -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi I could solve the problem by just rearranged format.html first and then format.js.. But still my doubt remains. Was that created the problem ?Is it a must to write format.html first? Sijo -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Tue, Sep 23, 2008 at 6:13 AM, Sijo Kg <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>wrote:> I could solve the problem by just rearranged format.html first and > then format.js.. But still my doubt remains. Was that created the > problem ?Is it a must to write format.html first?Yes, format.html must be first. The reason is that Rails uses the HTTP "Accepts" header to determine the content type that the browser is asking for. Along with reasonable things like "text/html", IE6 includes "*/*", telling Rails that it will take anything. Rails will server up the first response format that matches, so it''ll give the first one. Gross, isn''t it? Imagine the day when we won''t have to worry about IE6. *seeing visions of sitting in a hammock on the ocean* Brandon -- -------------------------------------------------------------------------------- Sessions by Collective Idea: Ruby on Rails training in a vacation setting http://sessions.collectiveidea.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---