Hi All, I am currently devleoping a Rails application and I need to do following as part of client side operations, 1. HTML Form validations 2. AJAX I am currently calling Javascript methods from views of my application; I heard about RJS(Remote Javascripts) templates; are the replacing Javascript altogether? can I use RJS for HTML Form validations and AJAX? What I believe is that with RJS there would be a server round trip as for every RJS template I have to write a method in controller. Is there an alternative to Javascript for HTML form validation in rails, or rather is there any preferred way over Javascript? Thanks in Advance, Jatinder -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060616/7ac04b83/attachment.html
Jatinder Singh wrote:> Hi All, > > I am currently devleoping a Rails application and I need to do following > as > part of client side operations, > > 1. HTML Form validations > 2. AJAX > > I am currently calling Javascript methods from views of my application; > I > heard about RJS(Remote Javascripts) templates; are the replacing > Javascript > altogether? can I use RJS for HTML Form validations and AJAX? > > What I believe is that with RJS there would be a server round trip as > for > every RJS template I have to write a method in controller. > Is there an alternative to Javascript for HTML form validation in rails, > or > rather is there any preferred way over Javascript? > > > Thanks in Advance, > JatinderRJS does not replace javascript. It does however, make updating a page with new data as a result of an AJAX request much easier, and make it in pure ruby. For client side form validation pure javascript is really the only way to go. Although client form validation which renders the proper javascript autmatically generated form the models validates_* methods sure would be a nice plugin. -- Posted via http://www.ruby-forum.com/.
Alex, Thanks for clearing up the doubts! -Jatinder On 6/16/06, Alex Wayne <rubyonrails@beautifulpixel.com> wrote:> > Jatinder Singh wrote: > > Hi All, > > > > I am currently devleoping a Rails application and I need to do following > > as > > part of client side operations, > > > > 1. HTML Form validations > > 2. AJAX > > > > I am currently calling Javascript methods from views of my application; > > I > > heard about RJS(Remote Javascripts) templates; are the replacing > > Javascript > > altogether? can I use RJS for HTML Form validations and AJAX? > > > > What I believe is that with RJS there would be a server round trip as > > for > > every RJS template I have to write a method in controller. > > Is there an alternative to Javascript for HTML form validation in rails, > > or > > rather is there any preferred way over Javascript? > > > > > > Thanks in Advance, > > Jatinder > > RJS does not replace javascript. It does however, make updating a page > with new data as a result of an AJAX request much easier, and make it in > pure ruby. > > For client side form validation pure javascript is really the only way > to go. > > Although client form validation which renders the proper javascript > autmatically generated form the models validates_* methods sure would be > a nice plugin. > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060619/0fed84a7/attachment.html