1

We have a CheckboxList & each item of this CheckboxList has one javascript function (clearcheckboxes()) defined for onclick attribute.

This CheckboxList is inside the UpdatePanel & Trigger is defined for this as well.

On the initial Page Load, I can see the defined javascript function on the each list item as below:

<input type="checkbox" value="0" onclick="javascript:clearcheckboxes('page_0_chbxList',this.id);setTimeout('__doPostBack(\'page_0$chbxList$0\',\'\')', 0)" checked="checked" name="page_0$chbxList$0" id="page_0_chbxJobList_0">

But when I select any checkbox & page get partially reload it removes the javascript function from onclick attribute :

<input type="checkbox" value="2" onclick="javascript:setTimeout('__doPostBack(\'page_0$chbxList$2\',\'\')', 0)" checked="checked" name="page_0$chbxList$2" id="page_0_chbxList_2">

How we can prevent removal our custom onclick javascript function on partial postback?

Jonathan Newton
  • 832
  • 6
  • 18
Vikram
  • 675
  • 6
  • 25

0 Answers0