Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
mistake +
Source Link
marbel82
  • 948
  • 1
  • 19
  • 41

With mootools With mootools (http://mootools.net/docs/core/Element/Element)

html:

<input type="radio" name="radiosname" value="1" /> <input type="radio" name="radiosname" value="2" id="radiowithval2"/> <input type="radio" name="radiosname" value="3" /> 

... js:

// Check if second radio is selected (by id) if ($('radiowithval2').get("checked")) // Check if third radio is selected (by name and value) if ($$('input[name=radiosname][value=3]:checked').length == 1) // Check if something in radio group is choosen if ($$('input[name=radiosname]:checked').length > 0) // Set second button selected (by id) $("oknoPytOdbl_checkJakPop""radiowithval2").set("checked", true) 

With mootools

<input type="radio" name="radiosname" value="1" /> <input type="radio" name="radiosname" value="2" id="radiowithval2"/> <input type="radio" name="radiosname" value="3" /> 

...

// Check if second radio is selected (by id) if ($('radiowithval2').get("checked")) // Check if third radio is selected (by name and value) if ($$('input[name=radiosname][value=3]:checked').length == 1) // Check if something in radio group is choosen if ($$('input[name=radiosname]:checked').length > 0) // Set second button selected (by id) $("oknoPytOdbl_checkJakPop").set("checked", true) 

With mootools (http://mootools.net/docs/core/Element/Element)

html:

<input type="radio" name="radiosname" value="1" /> <input type="radio" name="radiosname" value="2" id="radiowithval2"/> <input type="radio" name="radiosname" value="3" /> 

js:

// Check if second radio is selected (by id) if ($('radiowithval2').get("checked")) // Check if third radio is selected (by name and value) if ($$('input[name=radiosname][value=3]:checked').length == 1) // Check if something in radio group is choosen if ($$('input[name=radiosname]:checked').length > 0) // Set second button selected (by id) $("radiowithval2").set("checked", true) 
Source Link
marbel82
  • 948
  • 1
  • 19
  • 41

With mootools

<input type="radio" name="radiosname" value="1" /> <input type="radio" name="radiosname" value="2" id="radiowithval2"/> <input type="radio" name="radiosname" value="3" /> 

...

// Check if second radio is selected (by id) if ($('radiowithval2').get("checked")) // Check if third radio is selected (by name and value) if ($$('input[name=radiosname][value=3]:checked').length == 1) // Check if something in radio group is choosen if ($$('input[name=radiosname]:checked').length > 0) // Set second button selected (by id) $("oknoPytOdbl_checkJakPop").set("checked", true)