Adding javascript inside create view

I am a newcommer in both AS and RoR. I have a user active scaffold.
The user has name and password. I want to add a password strength
javascript inside the create view of user.

How can I customize my user default active scaffold view to add the
password strength javascript?

I looked at the Rjs files of Active Scaffolding. They are generic and
complicated. Can I customize rjs for this particular object user?

How can I render both AS default Rjs as well as mine?

Thanks a lot.

How can I customize my user default active scaffold view to add the
password strength javascript?

you can put your own JS in <%= javascript_include_tag ‘your_JS_Name’ %>

and call your JS in your form <% form_tag %> or to the password_field.

Reinhart
http://teapoci.blogspot.com

Thanks a lot.

Actually I am using Active Scaffold. I want to call the javascript
function from inside a view which also renders Active Scaffold default
view.

Can u help be about this?

Thanks a lot in advance.

I think (it’s been a while), that you can customise the output of each
form element for your view from within the helper that accompanies the
model you’re working with (e.g. UserHelper)

Try this to get you started:
http://activescaffold.com/docs/form-overrides

I figure you don’t just have to return the field, but could return
some html and a field observer that your password strength js could
use.

On Apr 17, 1:07 pm, Ishrat rahman Sami <rails-mailing-l…@andreas-

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs