• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JavaScript problem in case of radiobuttons

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I have a query in case of using the radio buttons in javaScript.
The problem is to retrieve the values which are checked in case of checkboxes as in document.formname.checkboxname.checked as the script but I am unable to retrieve the values in case of radio buttons- this does not work document.formname.radiobuttonname.checked.
Please assist........
[ August 08, 2006: Message edited by: Vicky Shah ]
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
radiobuttonname checked is an array since you have multiple elements with the same name so you have to use a index.

document.formname.radiobuttonname[0].checked

Eric
 
Brijesh Shah
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Eric Thanks for your immediate reply....
Great help for me for my project....
 
Ranch Hand
Posts: 367
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Often you want to check if at least on radiobutton i checked

reply
    Bookmark Topic Watch Topic
  • New Topic