This would be look like this:
<script language="javascript">
function doSomeThing();
{
//do something
var btn = document.getElementByID('btnHidden');
btn.click();
}
</script>
This will works fine in IE, but wont work in Firefox.
To get it work in Firefox add UseSubmitBehavior="false" property to button.This will make the button postback with the ASP.NET postback model.
ex:-<div style="display:none;">
<asp:Button id="btnHidden" runat="server"
OnClick="btnHidden_Click"
UseSubmitBehavior="false"
/>
</div>
With UseSubmitBehaviour="false" it will render onclick event for button & without this it wont render onclick event.
No comments:
Post a Comment