hey all, got a rails app i''m finishing up. i have a little ajax on one of my pages where the person can choose a doctor from a drop down list and if the doctor isn''t there they can click a link which blinds down a little form to add a doctor. after they submit that mini-form the page updates the div which houses the drop-down so the doctor shows up. works very nicely IN FIREFOX. I hate IE, i get an "RJS error: [object error]" with IE 6 and IE 7. i''d paste the error, but can''t copy the text in the damn alert box. i''ve googled this and i get a lot of results with people getting this error when adding rows to tables.. this doesn''t do that, but it does insert an option to the drop down. here''s my rjs template: unless params.has_key?("commit") if params[:cancel] page[:phys_form].visual_effect :blind_up else page[:phys_form].replace_html :partial => ''phys_form'' page[:phys_form].visual_effect :blind_down end else if @doctor.save page.insert_html :bottom, ''doctor_id'', ''<option value="'' + @doctor.id.to_s + ''">'' + @doctor.name + ''</option>'' page[:phys_form].visual_effect :blind_up else page[:phys_form].replace_html :partial => ''phys_form'' end end any help will be majorly appreciated. thanks in advance! stuart --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
stewbawka wrote:> hey all, > > got a rails app i''m finishing up. i have a little ajax on one of my > pages where the person can choose a doctor from a drop down list and if > the doctor isn''t there they can click a link which blinds down a little > form to add a doctor. after they submit that mini-form the page updates > the div which houses the drop-down so the doctor shows up. works very > nicely IN FIREFOX. I hate IE, i get an "RJS error: [object error]" with > IE 6 and IE 7. i''d paste the error, but can''t copy the text in the damn > alert box. > > i''ve googled this and i get a lot of results with people getting this > error when adding rows to tables.. this doesn''t do that, but it does > insert an option to the drop down. > > here''s my rjs template: > > unless params.has_key?("commit") > if params[:cancel] > page[:phys_form].visual_effect :blind_up > else > page[:phys_form].replace_html :partial => ''phys_form'' > page[:phys_form].visual_effect :blind_down > end > else > if @doctor.save > page.insert_html :bottom, ''doctor_id'', ''<option value="'' + > @doctor.id.to_s + ''">'' + @doctor.name + ''</option>'' > page[:phys_form].visual_effect :blind_up > > else > page[:phys_form].replace_html :partial => ''phys_form'' > end > end > > any help will be majorly appreciated. thanks in advance! > > stuartTry re-rendering and replacing the entire select control. Apparently IE chokes when you modify the inner_html of a select control. _Kevin --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
thanks for taking the time to try to help me out.. i''ll try this out tomorrow. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
just tried putting the dropdown in a div and replacing the whole div rather than inserting another option to the bottom.. still no luck. but i''ve realized now that its not at all the list option insertion that''s messing it up.. it fails way before that. it actually fails when i click the "Add doctor" link when its trying to replace the html in the div that houses the form to add doctors and blinds it up so its visible.. IE is basically failing at the simplest ajax things right now. Grrrrr any advice? i really need to get this working in IE and i don''t want to have to make a separate page for adding doctors. Microsoft SUCKS --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I''ve got the same problem I have a form with a checkable list of items. Each item can be edit which creates a form inside the first one. When validating the item editing form, I am not able to modify a div to display error messages. The div is inside the second form. I have tested the same code and removing the first form. It works. IE doesn''t seem to like modifying something like that: form > form > div Still Looking for a way to avoid the problem. -- 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 -~----------~----~----~----~------~----~------~--~---
Damien Le berrigaud wrote:> I''ve got the same problem > > I have a form with a checkable list of items. > Each item can be edit which creates a form inside the first one. > When validating the item editing form, I am not able to modify a div to > display error messages. The div is inside the second form. > > I have tested the same code and removing the first form. It works. IE > doesn''t seem to like modifying something like that: form > form > div > > Still Looking for a way to avoid the problem.I just solved the problem by moving the div in which I display my erro messages outside of the second form. I still need to make it look like it is still in the same place, but the Ajax stuff works now. -- 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 -~----------~----~----~----~------~----~------~--~---