Welcome to Working With Rails

 

Discussion Forums

Discuss all things Ruby on Rails with perhaps the web's most vibrant group of Ruby on Rails enthusiasts.
javascript validation
4 Posts
javascript validation

u can easily do it with live validation

And if you don't insist of doing it with Prototype, you can do some really cool usability form enhancements with JQuery.

how about using tooltips...? simply pass :alt => " " or :title => " " into text_field_tag. if you need fancy looking tootips you can use a javascript library. I found one here http://www.walterzorn.com/tooltip/tooltip_e.htm

Hi

I have a register form with three fields.

Name

Email

password

my requirement is...

when i focus("onFocus") on name "text_field" a small message should display as " Name required".

When i move from that text_field("onBlur") it has to validation. That is "empty or Not".

I have three options.

1) Livevalidation plugin.

2)observe_form

3)with javascript.

Im intrested to do in Javascript.

Please help me to do in javascript with example code.

with regards:

ANAS

4 Posts
Login to add your message