Radio Button
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');
}
});
}
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
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
Hi,
Please, try the following code:
Please, try the following code:
Code: Select all
fd.field('Leave_x0020_Type').change(function() {
alert(fd.field('Leave_x0020_Type').value());
});
-
- Information
-
Who is online
Users browsing this forum: No registered users and 23 guests