• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Javascript: How to get and change radio's label

Javascript: How to get and change radio's label 11 years 9 months ago #24259

  • lking
  • lking's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 24
Hey guys,

Just have a short question, how do we get and change the label of radio button using javascript and to something else? I mean should we use document.getElementsById? getElementsByName? by tag? or something else? Please see the following example:

Input type: Radio Button
Radio button Name: typeabc
Value: aaa, bbb, ccc

Based on the input type (radio button) above, the form will show up 3 radio buttons to select one. However, how do we change the "label" of ccc to eee for example (so that onpageload, it can actually run the script and automatically change from ccc to eee)? I tried innerHTML, getelementsbyid, by name and by tag, but none of them working and I'm not sure where and how do we refer this in terms of javascript..

Please advice,

Thanks
Regards,
Josh
Last Edit: 11 years 9 months ago by lking.
The administrator has disabled public write access.

Javascript: How to get and change radio's label 11 years 9 months ago #24264

  • lking
  • lking's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 24
{solved}
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!