In my application when i make an ajax call i am trying to update a div and it works fine in mozilla but not in IE. In IE all ajax calls are made but the div doesn''t get updated at all Any clue as to why this might be happening? My code looks something like <%=form_remote_tag :method=>''post'', :url=>{:action =>''choose_action'', }%> <div id="contract_data_element_data_<%=count%>" style="padding:10px;"> <%= link_to_remote ''Add Additional Values'', :url => {:action => ''update_auto_complete_div'', }%> </div> </form> def update_auto_complete_div render :update do |page| page.replace_html "contract_data_element_data_#{params[:count]}", :inline => "" page.replace_html "contract_data_element_data_#{params[:count]}", :partial=>''data_string_autocomplete'' end end -- 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 29 May 2008, at 22:04, Neha Chopra wrote:> > In my application when i make an ajax call i am trying to update a div > and it works fine in mozilla but not in IE. In IE all ajax calls are > made but the div doesn''t get updated at all > Any clue as to why this might be happening? >You''re not passing a count parameter to update_auto_complete_div, so its going to end up trying to replace the contents of contract_data_element_data_ which I assume doesn''t exist (why 2 replace_htmls?) Fred> My code looks something like > <%=form_remote_tag :method=>''post'', :url=>{:action =>''choose_action'', > }%> > <div id="contract_data_element_data_<%=count%>" style="padding: > 10px;"> > <%= link_to_remote ''Add Additional Values'', > :url => {:action => ''update_auto_complete_div'', }%> > </div> > </form> > > def update_auto_complete_div > render :update do |page| > page.replace_html "contract_data_element_data_#{params[:count]}", > :inline => "" > page.replace_html "contract_data_element_data_#{params[:count]}", > :partial=>''data_string_autocomplete'' > end > end > -- > 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 -~----------~----~----~----~------~----~------~--~---
Frederick Cheung wrote:> On 29 May 2008, at 22:04, Neha Chopra wrote: > >> >> In my application when i make an ajax call i am trying to update a div >> and it works fine in mozilla but not in IE. In IE all ajax calls are >> made but the div doesn''t get updated at all >> Any clue as to why this might be happening? >> > You''re not passing a count parameter to update_auto_complete_div, so > its going to end up trying to replace the contents of > contract_data_element_data_ which I assume doesn''t exist (why 2 > replace_htmls?) > > FredActually i am passing that parameter and a number of other parameters. Even if my code is like <%=form_remote_tag :method=>''post'', :url=>{:action =>''choose_action'', }%> <div id="contract_data_element_data" style="padding:10px;"> <%= link_to_remote ''Add Additional Values'', :url => {:action => ''update_auto_complete_div'', }%> </div> </form> def update_auto_complete_div render :update do |page| page.replace_html "contract_data_element_data_#{params[:count]}", :inline => "" page.replace_html "contract_data_element_data_#{params[:count]}", :partial=>''data_string_autocomplete'' end end It still doesnt work in IE -- 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 29 May 2008, at 23:21, Neha Chopra wrote:> > Frederick Cheung wrote: >> On 29 May 2008, at 22:04, Neha Chopra wrote: >> >>> >>> In my application when i make an ajax call i am trying to update a >>> div >>> and it works fine in mozilla but not in IE. In IE all ajax calls are >>> made but the div doesn''t get updated at all >>> Any clue as to why this might be happening? >>> >> You''re not passing a count parameter to update_auto_complete_div, so >> its going to end up trying to replace the contents of >> contract_data_element_data_ which I assume doesn''t exist (why 2 >> replace_htmls?) >> >> Fred > > Actually i am passing that parameter and a number of other parameters. > Even if my code is like > <%=form_remote_tag :method=>''post'', :url=>{:action =>''choose_action'', > }%> > <div id="contract_data_element_data" style="padding:10px;"> > <%= link_to_remote ''Add Additional Values'', > :url => {:action => ''update_auto_complete_div'', }%> > </div> > </form>You''d have to set the div id to contract_data_element_data_ If that code is what''s in your view (and if not then asking people to help diagnose a problem with 1 piece of code while showing another) then you''re really not passing any parameters to update_auto_complete_div. IE6 is weird though. Fred> > > def update_auto_complete_div > render :update do |page| > page.replace_html "contract_data_element_data_#{params[:count]}", > :inline => "" > page.replace_html "contract_data_element_data_#{params[:count]}", > :partial=>''data_string_autocomplete'' > end > end > > It still doesnt work in IE > -- > 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 -~----------~----~----~----~------~----~------~--~---
Frederick Cheung wrote:> On 29 May 2008, at 23:21, Neha Chopra wrote: > >>>> >> }%> >> <div id="contract_data_element_data" style="padding:10px;"> >> <%= link_to_remote ''Add Additional Values'', >> :url => {:action => ''update_auto_complete_div'', }%> >> </div> >> </form> > > You''d have to set the div id to contract_data_element_data_ > If that code is what''s in your view (and if not then asking people to > help diagnose a problem with 1 piece of code while showing another) > then you''re really not passing any parameters to > update_auto_complete_div. IE6 is weird though. > > FredIn my code i open a popup window and when i create that window for the first time it works fine in IE also...but then when i open another window that has code to edit those values it stops working. -- 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 -~----------~----~----~----~------~----~------~--~---