Just off the top of my head, I'm gonna go on a limb here and say you can use other means to pass this data to the js environment without mucking up your markup. That is assuming this is not really semantically relevant data, but rather some meta-information or application state stuff you're trying to marshal back and forth.

Why not simply render _javascript_ tags packaged with this data ("script" is a valid xhtml tag ya know)...

On 7/23/06, Michael Schuerig <[EMAIL PROTECTED]> wrote:

I'm looking for a clean way to add attributes to HTML elements in order
to pass information to _javascript_. I'd like to write valid XHTML and
therefore in the past have eschewed adding non-standard attributes.
Instead, I encoded my additional information in the class attribute,
which is technically valid, but doesn't feel very clean nevertheless.
Is there a nice, easy, and validating way of achieving what I'm trying
to do?

Michael

--
Michael Schuerig
mailto:[EMAIL PROTECTED]
http://www.schuerig.de/michael/
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to