I have a button
<asp:Button ID="submitRegionsButton" runat="server" Text="OK" OnClick="OnSubmitRegion" />
and when I click it, everything works as expected, however when I have a javascript function call it using btn.click(), the click command is not executed. The button is found properly but just doesn't then work or run the OnClick function in my code behind
Any ideas? It works in IE, haven't tested firefox though
Okay, tested in firefox, doesn't work there. Everything works right up until the actual call to .click(), no idea why :/
Code that calls the click:
function dropDownProductBlur() {
if (isItemClicked) {
var combo = $find("<%= productDropDown.ClientID %>");
var btnSubmitProd = $get(combo.get_id() + "_Footer" + "_submitProductsButton");
if (btnSubmitProd)
btnSubmitProd.click();
}
}
Just for understanding, the button is contained within a dropdown, and when the dropdown closes, it "clicks" the button (or, well, is supposed to..) clicking the button manually works, and the find works and finds the button properly.