jquery button click not firing asp.net button

Posted by lloydphillips on Stack Overflow See other posts from Stack Overflow or by lloydphillips
Published on 2010-06-01T02:50:53Z Indexed on 2010/06/01 2:53 UTC
Read the original article Hit count: 284

Filed under:
|
|

I've got a .net button that has an href attribute value set to 'javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$cp1$ucInvoiceSearch$btnSearch", "", true, "", "", false, true))'. I've got a textbox that when I press enter I want it to fire this event. Doing the 'Enter' event isn't an issue but I can't get the event on the href to fire using .click(). Here's my function so far:

$("[id*='tbInvNo']").keyup(function(event){
        var $btn = $(".pnl-invoice-search");
        if(event.keyCode == 13)
            $btn.click();
    });

I've got no idea how to get this to fire. Hope someone can help - jQuery and asp.net are driving me up the wall today! :(

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about jQuery