Oct 06, 2008, 4:45 AM
[CLOSED] AjaxMethod issue
Hello.
I tried to implement the authentication sample, but I can't get it to work, and I dn't have any clue why.
Here is my code
Authentification.ascx
Also, the error windows displays just fine with ff, but the 4 supposedly hidden fields are displayed as inputs with ie. Hiding them would be really appreciated :p
Edit : I meant AjaxEvents issue, sry -_-
I tried to implement the authentication sample, but I can't get it to work, and I dn't have any clue why.
Here is my code
Authentification.ascx
<ext:ScriptManager ID="ScriptManager1" runat="server" />
<ext:Window ID="LoginWindow" runat="server" Closable="false" Resizable="false" Height="150"
Icon="Lock" Title="Authentification" Draggable="false" Width="350" Modal="true"
BodyStyle="padding:5px;">
<Content>
<ext:FormLayout ID="FormLayout1" runat="server">
<ext:Anchor>
<ext:TextField ID="txtUsername" runat="server" FieldLabel="Identifiant" AllowBlank="false"
BlankText="Votre identifiant est requis." EmptyText="monadresse@mail.com" Width="200px" />
</ext:Anchor>
<ext:Anchor>
<ext:TextField ID="txtPassword" runat="server" InputType="Password" FieldLabel="Mot de passe"
AllowBlank="false" BlankText="Votre mot de passe est requis." EmptyText="Mot de passe"
Width="200px" />
</ext:Anchor>
<ext:Anchor>
<ext:Label ID="lblMessage" runat="server" />
</ext:Anchor>
</ext:FormLayout>
</Content>
<Buttons>
<ext:Button ID="btnLogin" runat="server" Text="Connection" Icon="Accept">
<Listeners>
<Click Handler="if(!#{txtUsername}.validate() || !#{txtPassword}.validate()) {
Ext.Msg.alert('Erreur','L\'identifiant et le mot de passe sont requis');
// return false to prevent the btnLogin_Click Ajax Click event from firing.
return false;
}" />
</Listeners>
<AjaxEvents>
<Click OnEvent="btnLogin_Click">
<EventMask ShowMask="true" Msg="Vérification..." MinDelay="500" Target="CustomTarget"
CustomTarget="#{LoginWindow}" />
</Click>
</AjaxEvents>
</ext:Button>
</Buttons>
</ext:Window>
Authentification.ascx.vb
Protected Sub btnLogin_Click(ByVal sender As Object, ByVal e As System.EventArgs)
lblMessage.SetText("Identifiant ou mot de passe incorrect")
End Sub
Now the problem is that it doesn't work that way, as it throw a "BADRESPONSE, syntax error" window. Any help would be appreciated.Also, the error windows displays just fine with ff, but the 4 supposedly hidden fields are displayed as inputs with ie. Hiding them would be really appreciated :p
Edit : I meant AjaxEvents issue, sry -_-