Question
I have a page, on page I have one button, that button click performs 3 functions. I need to auto call the button click event as soon the single function call done. After completion of each function I added the code
script = " document.getElementById('" & btnCreateApprove.ClientID & "').click(); }"
ScriptManager.RegisterStartupScript(Me, Me.GetType(), "btnCreateApproveClick", script, True).
by adding this code I can call the button click automatically after a function call completion, The page is having one Update panel which says "Processing please wait.." it displays when function is performing its action. After the first auto click I got the error object reference not found for the update panel. I think my auto click call happens before the page fully loaded. Let me know what to do.
No correct solution
OTHER TIPS
<script type="text/javascript">
$(document).ready(function(){
$('#printbuttoncustomer').trigger('click');
});
</script>
<input name="printbuttoncustomer" id="printbuttoncustomer" type="hidden" />
For some reason you're using &
instead of +
.
The first line should read:
script = " document.getElementById('" + btnCreateApprove.ClientID + "').click(); }"
Or else you'll get an error.