I am attempting to fire the click() event when a button is clicked.
This currently works for me in IE however I receive the following error in firefox:
"link.click is not a function"
I have been trawling google regarding this and found out the .click event is not supported in all versions of firefox.
Is anyone able to provide an alternative? Code below:
<asp:LinkButton ID="ButtonNext" runat="server" CssClass="RemoveLinkStyle" TabIndex="1"></asp:LinkButton>
<table id="tblButtonNext" runat="server" cellpadding="0" cellspacing="0" class="pwbtn" onclick="ButtonClick(ButtonNext);" TabIndex="1" onmouseout="this.className='pwbtn';" onmouseover="this.className='pwbtnh';">
<tr>
<td class="a1"></td>
<td class="a2">
<%= this.resourceManager.GetString("nextstep") %>
</td>
<td class="a3"></td>
<td class="spacer"></td>
</tr>
</table>
function ExecuteLink(linkID)
{
var link = document.getElementById(linkID);
link.click();
}
function ButtonClick(linkID)
{
PreNavigationScript();
CallShowBlocker();
ExecuteLink(linkID);
}