Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to figure out what event is being called in javascript

I'm using ASP.NET, but on a certain page I am using regular html text boxes as the request is done with AJAX, rather than the traditional full page post back. My issue is that when the user fills out the last text box and presses enter the text box loses focus and the page scrolls all the way to the bottom.

I tried using the onblur event but it's not working, so I'm wondering what event is actually being called when the enter key is pressed(or any key for that matter).

I tried this:

$("#loginPass").blur(function (e) {
            if (e.keyCode == 13) 
                $("#DealerLogin").click();
        });

I have firebug for Firefox but can't figure out how to look at what js related operations are firing.

like image 348
The Muffin Man Avatar asked Dec 08 '25 06:12

The Muffin Man


1 Answers

In the Firebug scripts panel, you can click the pause button:

Pause btn in Firebug

Try it right before you hit enter, then step through the code.

like image 159
webXL Avatar answered Dec 09 '25 20:12

webXL