Radio Button

rss

Posted by Bryan - Apr 27 ’15 at 04:48

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');

}

});

}

 

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 6 years 6 months 20 days
    #1 by Dmitry Kozlov Apr 27 ’15 at 10:10

    Hi,

    Please, try the following code:

    fd.field('Leave_x0020_Type').change(function() {
    	alert(fd.field('Leave_x0020_Type').value());
    });
    
  • Bryan
    Member
    Member for: 4 years 11 months 17 days
    #2 by Bryan Apr 27 ’15 at 08:37

    Thanks

Displaying 1 to 2 of 2 messages