hi guys, I am testing a new optional funtionality in my site with IE 8 after success with Firefox 3.6.3, chrome and safari. The new functionality basically sees a "sub category" drop down list get generated in my form as soon as a "Category" value is selected from the "Category" drop down list. I have been using the standard rails api such as observe_field, and collective_select. Anyway, when I loaded up the webpage on IE8 and selected a value from the "Category" drop down list, the form fails to show the subcategory drop down list. Ajax doesn''t seem to be working here in IE8. I know that rails uses prototype. I have read that prototype 1.6RC2 is fully compatible with IE 8 (http://www.prototypejs.org/2009/3/27/prototype-1-6-1-rc2-ie8- compatibility-element-storage-and-bug-fixes) . I downloaded it and reloaded the webpage . No difference. 1) has anyone managed to get around the problem whereby ajax use in IE8 fails? 2) has anyone got an alternative such as using observe_field/ observe_form and calling the whole url (appended with the selected values at the time to load the other dynamic values (in this case, category id which is appended to the url which would then load the whole page with a bunch of sub category values ) )? thanks -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 4 June 2010 13:58, ct9a <anexiole-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> hi guys, > > I am testing a new optional funtionality in my site with IE 8 after > success with Firefox 3.6.3, chrome and safari. > > The new functionality basically sees a "sub category" drop down list > get generated in my form as soon as a "Category" value is selected > from the "Category" drop down list. > > I have been using the standard rails api such as observe_field, and > collective_select. > > Anyway, when I loaded up the webpage on IE8 and selected a value from > the "Category" drop down list, the form fails to show the subcategory > drop down list. > > Ajax doesn''t seem to be working here in IE8.Just a thought, have you checked that your html is valid by pasting the complete page source into the w3c html validator? Differences between browsers is often down to invalid html. Colin> I know that rails uses prototype. > I have read that prototype 1.6RC2 is fully compatible with IE 8 > (http://www.prototypejs.org/2009/3/27/prototype-1-6-1-rc2-ie8- > compatibility-element-storage-and-bug-fixes) . > I downloaded it and reloaded the webpage . No difference. > > 1) has anyone managed to get around the problem whereby ajax use in > IE8 fails? > 2) has anyone got an alternative such as using observe_field/ > observe_form and calling the whole url (appended with the selected > values at the time to load the other dynamic values (in this case, > category id which is appended to the url which would then load the > whole page with a bunch of sub category values ) )? > > thanks > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hi, Colin, Every page I make has to pass by W3C''s validation. It''s a pity why IE8 doesn''t really support prototype and rails'' JS helpers are made out of prototype... Any more ideas guys? Gordon On Jun 5, 1:17 am, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> Just a thought, have you checked that your html is valid by pasting > the complete page source into the w3c html validator? Differences > between browsers is often down to invalid html. > > Colin >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hi, As I have to guess your code, I can just share my experience with Ajax and IE. I recently had a similar problem with the Ajax :update=>''<#id>'' call. I updated a <p> element which went perfect in Firefox, but not in IE. After changing the <p> element into a <div> my code fired in IE as well. So, you might check the HTML you''re using. Jan On Jun 5, 2:20 am, ct9a <anexi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, Colin, > > Every page I make has to pass by W3C''s validation. > > It''s a pity why IE8 doesn''t really support prototype and rails'' JS > helpers are made out of prototype... > > Any more ideas guys? > > Gordon > > On Jun 5, 1:17 am, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: > > > Just a thought, have you checked that your html is valid by pasting > > the complete page source into the w3c html validator? Differences > > between browsers is often down to invalid html. > > > Colin-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
ok i will look into it soon and report back. Thank you! Anyone else? I m sure you guys use Ajax in your rails apps. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
hi there, Javinto, I checked and my code swapped some <p> for <div>. Tested and still no good with IE8. diff --git a/app/views/parts/_form.html.erb b/app/views/parts/_form.html.erb index c5cd780..eae7407 100644 --- a/app/views/parts/_form.html.erb +++ b/app/views/parts/_form.html.erb @@ -16,13 +16,13 @@ <%= render :partial => ''sub_categories/select'', :locals => { :part => @part } %> </div> - <p> + <div> <%= observe_field :part_category_id, :url => { :action => :get_subcategories }, :update => :subcategory_div, :with => ''category'' %> - </p> + </div> <p> <%= image_tag(''required_attribute.gif'', :alt => "image for required attribute") %> diff --git a/app/views/parts/get_subcategories.erb b/app/views/parts/get_subcategories.erb index 9737bad..498001d 100644 --- a/app/views/parts/get_subcategories.erb +++ b/app/views/parts/get_subcategories.erb <% if (!@sub_categories.nil? and @sub_categories.length > 0) %> -<p> +<div> Sub category:<br /> <%= collection_select( :part, {:include_blank => true} ) %> -</p> +</div> <% end %> Any ideas? On 5 June 2010 19:39, javinto <jan.javinto-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > As I have to guess your code, I can just share my experience with Ajax > and IE. > > I recently had a similar problem with the Ajax :update=>''<#id>'' call. > I updated a <p> element which went perfect in Firefox, but not in IE. > After changing the <p> element into a <div> my code fired in IE as > well. So, you might check the HTML you''re using. > > Jan > > > On Jun 5, 2:20 am, ct9a <anexi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Hi, Colin, > > > > Every page I make has to pass by W3C''s validation. > > > > It''s a pity why IE8 doesn''t really support prototype and rails'' JS > > helpers are made out of prototype... > > > > Any more ideas guys? > > > > Gordon > > > > On Jun 5, 1:17 am, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: > > > > > Just a thought, have you checked that your html is valid by pasting > > > the complete page source into the w3c html validator? Differences > > > between browsers is often down to invalid html. > > > > > Colin > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
hi, guys, I solved the problem. SOLUTION: Do not explicitly include references to the prototype js framework. WHAT I HAVE IN MY SOURCE CODE (ie. "app/views/layouts/application.html.erb"): ===============================================================> ---Extract start > > <script type="text/javascript" src="/javascripts/prototype.js"></script> > <script type="text/javascript" > src="/javascripts/scriptaculous.js?load=effects,builder"></script> > <%= javascript_include_tag :defaults, ''jquery'', ''prototype'' %> > <%= stylesheet_link_tag ''scaffold'', ''table_style'' %> > <script type="text"> > jQuery.noConflict(); > </script> > > ---Extract end >WHY THE PROBLEM OCCURED IN MY SOURCE CODE: ============================================ 1. Reading http://www.51773.com/tools/api.rubyonrails.org/classes/ActionView/Helpers/JavaScriptHelper.html, rails includes the Rails includes the Prototype JavaScript framework. I suppose this is done by doing either the following in the head of the application ( in my case, "app/views/layouts/application.html.erb"). Here''s an extract from the link I pasted:> "Rails includes the Prototype JavaScript framework and the > Scriptaculous JavaScript controls and visual effects library. If you wish to > use these libraries and their helpers (ActionView::Helpers::PrototypeHelper > and ActionView::Helpers::ScriptaculousHelper), you must do one of the > following: > > * Use <%= javascript_include_tag :defaults %> in the HEAD section > of your page (recommended): This function will return references to the > JavaScript files created by the rails command in your public/javascripts > directory. Using it is recommended as the browser can then cache the > libraries instead of fetching all the functions anew on every request." >2. I seemed to have repeatedly referenced prototype.js (ie via :defaults, and script="javascript/text" ) HOW I FIXED IT: ============ - Removed all references to prototype.js and left the :default call in the javascript include tag (ie. " <%= javascript_include_tag :defaults, ''jquery'' %>" - Restarted the web server and tested changes on firefox 3.6.3, chrome, safari, IE 7 and IE 8 - worked as expected. Hope this helps some of you using IE 8. Gordon Yeong -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.