Henrik N
2006-Feb-12 14:01 UTC
[Rails] link_to_remote (AJAX) and tables: IE issues, validation?
I have a table that lists domain names, with a form next to it to add new domains. I have AJAXified this so that new domains are immediately added as table rows. This works fine in Firefox 1.5/Win, but not in IE6/Win. Domains are added into the database, but the HTML table is not updated unless you reload the page. Some googling tells me there are issues with e.g. link_to_remote updating tables in IE (I tried updating a div and that worked fine), so I''m simply asking if anyone knows of a decent solution, other than going non-AJAX, dropping IE support or using something other than a table. Also, has anyone written code to get validations with link_to_remote? So if someone attempts to add a non-valid domain, you would get some sort of readable error message. Some of my code: View: <%= form_remote_tag( :url => { :action => ''create'' }, :update => "items", :position => :bottom, :complete => ''focus_field()'') %> Controller: def create @domain = Domain.new(params[:domain]) if @domain.save render(:partial => ''domain'', :object => @domain, :layout => false) else #FIXME: No decent error handling yet - try adding duplicate domains render :action => ''new'' end end where "items" is a table and the domain partial a table row. -- Posted via http://www.ruby-forum.com/.
BigSmoke
2006-Apr-04 13:08 UTC
[Rails] link_to_remote (AJAX) and tables: IE issues, validation?
On 2/12/06, Henrik N <henrik@nyh.se> wrote:> Also, has anyone written code to get validations with link_to_remote? So > if someone attempts to add a non-valid domain, you would get some sort > of readable error message.I''ve written an article on this subject, which you can find at http://www.bigsmoke.us/ajax-validations-in-rails Please let me know if you find anything uncomplete, unclear or missing, - Rowan -- Morality is usually taught by the immoral. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060404/3658f815/attachment-0001.html
Neha Chopra
2008-May-29 20:48 UTC
Re: link_to_remote (AJAX) and tables: IE issues, validation?
BigSmoke wrote:> On 2/12/06, Henrik N <henrik-//VPbvzLDw4@public.gmane.org> wrote: > >> Also, has anyone written code to get validations with link_to_remote? So >> if someone attempts to add a non-valid domain, you would get some sort >> of readable error message. > > > I''ve written an article on this subject, which you can find at > http://www.bigsmoke.us/ajax-validations-in-rails > > Please let me know if you find anything uncomplete, unclear or missing, > > - RowanHi, I need help in this matter but that link doesnt seem to be working. Can u help me. Neha -- 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 -~----------~----~----~----~------~----~------~--~---
Possibly Parallel Threads
- Repost - Do dynamic finders work with legacy schemas?
- [Prototype] Why doesn''t calling submit() on a form result in the execution of the onsubmit event handler?
- Using mocks
- Checking the existance of a NOT NULL constraint from Active Record
- Are migrations executed within a transaction?