Adding the attribute ID to HTML Element <a>


#1

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

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


#2

J. mp wrote:

link_to_remote(“Shoe”,
:update=>“tag_cloud_header”,
:url =>{:controller =>:header, :action=>:hide_tag_cloud},
:id => “someId”
);
should work.