GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
HTML::DOM::NodeList::Radio(3) User Contributed Perl Documentation HTML::DOM::NodeList::Radio(3)

HTML::DOM::NodeList::Radio - A Perl class for representing lists of radio buttons in an HTML DOM tree

Version 0.054

  use HTML::DOM;
  $doc = HTML::DOM->new;
  $doc->write('
      <form>
          <input name=r type=radio value=one>
          <input name=r type=radio value=two>
      </form>
  ');
  $doc->close;

  $radio_list = $doc->forms->[0]->find_input('r');
  # returns an HTML::DOM::NodeList::Radio object

  $radio_list->[0]; # get first button
  $radio_list->item(0); # same

  # also:
  $radio_list->value('two'); # select a radio button
  $radio-list->name; # returns 'r'

An object of this class represents a list of radio buttons in an HTML::DOM tree. This class inherits from HTML::DOM::NodeList:: and is provided solely for compatibility with WWW::Mechanize.

In addition to those inherited from HTML::DOM::NodeList, this class implements the following methods:
type
Returns the string 'radio'.
name
Returns the name of the set of radio buttons. If you pass an argument, it will become the new name of the set (all the buttons will be renamed), and the old name will be returned.
value
Returns the value attribute of the currently selected radio button. If you pass a value as an argument, the radio button with that value will be selected, and the value of the previously selected one will be returned.
possible_values
Returns a list of the value attributes of all the radio buttons.
form_name_value
Returns a list of two items: (0) the name of the set of buttons and (1) the value of the currently selected button.

HTML::DOM

HTML::DOM::NodeList

HTML::DOM::Collection::Elements

HTML::DOM::Element::Form

The source of HTML/DOM/Element/Form.pm, where this is implemented.

2014-12-23 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.