I'm trying to do this in a .js header:
tmp.setAttribute("onclick",'<%= remote_function(:update => "mainbody",
:url => { :contoller => :subject, :action => :new }) %>')
I've fiddled with the syntax slightly (eg, ' vs " vs \") but the best I
seem to get is an "Illegal XML character" error from firebug, citing the
erb tag above, which tag worked fine in the page source itself.
How can *use DOM* to set an "onclick" method to rails/Erb function?
--
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
-~----------~----~----~----~------~----~------~--~---