Quantcast
Channel: SharePoint 2010 - General Discussions and Questions forum
Viewing all articles
Browse latest Browse all 17574

jquery function not working after removing alert in a SharePoint list

$
0
0

  Hi everyone,

I have a problem with javascript could anyone help me on this!!

I have a list with checkboxes for each row when i select more then one item in the list using check box the button should be disabled.

for the first time it is working fine but if i refresh the page the button is not disabling if i select more than one checkbox

function Hidebutton() {

       AddManagePermsMenuItem = function (m, ctx) { }

       AddListMenuItems = function (m, ctx) { }

       $(".ms-listviewtable input").bind('click', function () {

           var checkedCheckboxes = $("input.s4-itm-cbx:checkbox:checked").size();

           if (checkedCheckboxes >= 2) {

                $('.txtUpdatebuttonStyle').attr('disabled', 'disabled');

           }

           else {

               $('.txtUpdatebuttonStyle').removeAttr('disabled');

           }

       });

    }

 

    // To disable Modify button in case of multiselection.

    _spBodyOnLoadFunctionNames.push("Hidebutton");

Thanks,

Sarath


Sarath Sannadi Sharepoint Dev at Saksoft



Viewing all articles
Browse latest Browse all 17574


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>