> bingo bob wrote:
>> 
>> Can anyone help me out with a javascript walk through. I assume this is
>> something that lots of other's have done. I have an Advert form and on
>> it I have a text_field "Advert.description", it's validated on
>> characters, 10..1000, nothing to see here, all perfectly normal, all
>> working fine.
>> 
>> Now then, I'd like one of those twitter like character count downs above
>> the field so the user can see how much they're got left to type or if
>> they've gone over the limit, BEFORE they submit. You get the picture.
>> How to do? 

How about using observe_field, and triggering some kind of action every 
.2 second that counts how many characters there are, then updates some 
kind of div?

Note that I don't know exactly how this works, so you may be going back 
to your server every .2 seconds to get an update. If you're lucky, the 
action will be embedded in your page and it'll be done on the 
client-side.. But Marnen is right, this is, at the core, a Javascript 
question.
-- 
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to