Hi.
In my App i have Tabs like below

[Manage Contacts] [Roles] [users] [Contact Us]

<a href="#" id="d1" onclick= "tp_select();">Manage Accounts</a>
<a href="#" id="d2" onclick= "tp_select();">Roles</a>
<a href="#" id="d3">onclick= "tp_select();">Users</a>
<a href="#" id="d4">onclick= "tp_select();">Contact Us</a>

[On click Event]if user clicks on  Roles tab means the Style class
"tp_select" has to be called for Roles tab.
and if user clicks on Contact Us tab means the Style class "tp_select"
has to be called for Contact Us tab.
#-----i ve done java script function----#
function tp_select() {
    $('d1').addClassName('tp_select')


}

#--------------#
i don't know how to call this function for all the element.
it works for Manage Accounts tab.
i don't know how to write javascript function for all the tab.
Pls help me on this.
Pls advice.
-- 
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to