Hans Hartmann wrote:
[...]
> Question:
> How can I check if a box was clicked last time(value saved in the table)
Look at the appropriate field in the database. If you use form_for, it
does that for free.
>
> into the blue:
> if "value" exists in "table"
> document.getElementById("checkbox1").checked = true
> if "value" doesn't exist in "table"
> document.getElementById("checkbox1").checked = false
Why on earth would you do this in client-side JavaScript instead of on
the server side? That doesn't appear to make sense.
>
>
> Thx for your answers
Best,
--
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
--
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
-~----------~----~----~----~------~----~------~--~---