Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Weird behavior
Message
 
 
To
All
General information
Forum:
ASP.NET
Category:
Client-side development
Title:
Weird behavior
Environment versions
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01555119
Message ID:
01555119
Views:
62
Hi everybody,

I am trying to do relatively simple things:

1. Set focus on a particular control when the form is loaded

2. When I enter a text in the search control and press Enter, fire the Search button click.

Here is what I am trying in the main js script which is loaded from the _Layout.cshtml:
$('#frmClientsSearch').ready(function () {
    alert($("#searchClientName"));
    $("#searchClientName").focus();
});

$("#searchClientName").keyup(function (event) {
    alert("searchClientName keyup");
    if (event.keyCode == 13) {
        
        $("#btnClientsSearch").click();
    }
});
Here is the behavior I observe in FireFox:

1. Even before I call the Client form from the menu, I got the first Alert. After I call that form from the menu, the alert is shown again, but the focus is not set

2. The KeyUp never seems to fire

Also, in firefox TAB doesn't seem to work at all although it works in Google Chrome - e.g. I can tab out from one textbox to another.

Do you see what may be wrong?

Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Reply
Map
View

Click here to load this message in the networking platform