Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Weird behavior
Message
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Client-side développement
Titre:
Weird behavior
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01555119
Message ID:
01555119
Vues:
61
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
Répondre
Fil
Voir

Click here to load this message in the networking platform