Login Register

radiobuitton

radiobutton: get selected value

After hours of searching a way to submit only the value of an radiobutton group, i find myself searching in the api. as far as i see, there is no simple way to access the checked (selected) value. So i just hacked into the Checkbox.js following code:

getCheckedValue: function(){
			// HACK
			var res = false;
			dojo.forEach(this._groups[this.name], function(widget){
				if(widget.checked) res = widget.value;
			}, this);	
			return res;
		},

It works so far. Maybe its a nice extension for the next release...
You can call it by:

Syndicate content