Page 1 of 1

Radio Button

Posted: 27 Apr 2015
by Bryan
Hi,I have 1 radio button(Leave_x0020_Type) with 2 choices(Apply Leave & Cancel Leave).

I want click on apply leave/cancel leave and it will execute the alert.

But i couldnt do it with my code. Hope can get your reply soon. Thanks.


SP.SOD.executeFunc('sp.js','SP.ClientContext',testing);

function testing() {

fd.field('Leave_x0020_Type').control()._el().find('RadioButtons').click(function(){

if(fd.field('Leave_x0020_Type').value() == 0){

alert('APPLY LEAVE');

}

});

}

Re: Radio Button

Posted: 27 Apr 2015
by Dmitry Kozlov
Hi,

Please, try the following code:

Code: Select all

fd.field('Leave_x0020_Type').change(function() {
	alert(fd.field('Leave_x0020_Type').value());
});

Re: Radio Button

Posted: 27 Apr 2015
by Bryan
Thanks