Adding the attribute ID to HTML Element

J. mp
Tue, 20 Feb 2007 00:08:16 -0000

Hi,

How can I add the attribute id to element when using link_to_remote?

Here what I''m doing:
link_to_remote("Shoe",
      :update=>"tag_cloud_header",
      :url =>{:controller =>:header, :action=>:hide_tag_cloud});

This produces an HTML like

<a href="#" onclick="new
Ajax.Updater(''tag_cloud_header'',
''/header/hide_tag_cloud'', {asynchronous:true,
evalScripts:true}); return
false;">hide

But I need to put the id in the rendered code like

<a href="#" id="someId" onclick="new
Ajax.Updater(''tag_cloud_header'',
...

Thanks

--
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---