Hi All,
I am currently devleoping a Rails application and I need to do following
as
part of client side operations,
- HTML Form validations
- 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
Jatinder S. wrote:
Hi All,
I am currently devleoping a Rails application and I need to do following
as
part of client side operations,
- HTML Form validations
- 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.
Alex, Thanks for clearing up the doubts!
-Jatinder