Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

__dopostback is not working in javascript function

am calling __dopostback function in javascript while closing event of browser but its not working in Chrome.

the same function is working in IE

can any one give me the solution.

<script type="text/javascript" language="javascript"> 
function doUnload() 
{ 
 var btnlogout = document.getElementById("ctl00_lbtn_Logout"); alert(btnlogout);   
 __doPostBack(btnlogout, ''); 
} 
</script>
like image 563
janakiakula Avatar asked May 12 '26 06:05

janakiakula


1 Answers

When doing a __doPostBack, you need to pass the control's UniqueID via javascript. ClientID will not work.

like image 95
dgarbacz Avatar answered May 14 '26 20:05

dgarbacz