Ajaxevent Request failure

  1. #1

    Ajaxevent Request failure

    Hi,






    Can someone help me pleaseee ..... i am lost ....
    i am a coolite newbie. Sometimes i encounter request failure when submit a ajaxevent while sometimes i submit it successfully.
    I am not sure if i am doing it correctly. Heres my sample codes and screen shots.


    <U>Screetshots:</U>


    http://nanodemo.co.cc/lisa/interface%20error.doc


    <U>Full Code:</U>


    http://nanodemo.co.cc/lisa/index.txt


    <U>Sample code :</U>


    
    
    <ext:Window                 
                ID="loginwin" 
                runat="server" 
                Closable="false"
                Resizable="false"
                Height="150" 
                Icon="Lock" 
                Title="Login"
                Draggable="false"
                Width="350"
                Modal="true"
                Show&#111;nload=FALSE
                BodyStyle="padding:5px;">
                <Body>
                    <ext:FormLayout ID="FormLayout1" runat="server">
                        <ext:Anchor Horizontal="100%">
                            <ext:TextField ID="txtUsername" runat="server" FieldLabel="Username"
                                AllowBlank="false" BlankText="Your username is required." EmptyText="RXXXXX" 
                                Regex="^[Rr]\d{5}$" StyleSpec="text-transform:uppercase" InvalidText="Wrong format!"/>
                        </ext:Anchor>
                        <ext:Anchor Horizontal="100%">
                            <ext:TextField ID="txtPassword" runat="server" InputType="Password"
                                FieldLabel="Password" AllowBlank="false" BlankText="Your password is required."
                                />
                        </ext:Anchor>
                    </ext:FormLayout>
                </Body>
                <Buttons>
                    <ext:Button ID="login" runat="server" Text="Login" Icon="Accept">
                        <AjaxEvents>
                            <Click OnEvent="login_Click" Buffer="1000" Delay ="250">
                                <ExtraParams>
                                    <ext:Parameter Name="userid" Value="#{txtUsername}.getValue()" Mode="Raw" />
                                    <ext:Parameter Name="password" Value="#{txtPassword}.getValue()" Mode="Raw" />
                                </ExtraParams>
                                <EventMask ShowMask="true" Msg="Verifying..." MinDelay="1000" />
                            </Click>
                        </AjaxEvents>
                    </ext:Button>
                </Buttons>
            </ext:Window>

    
    
    Protected Sub login_Click(ByVal sender As Object, ByVal e As AjaxEventArgs)
    
    
        Dim param As Coolite.Ext.Web.ParameterCollection = e.ExtraParams
    
    
        Dim userid As String = UCase(param("userid").ToString)
    
    
        Dim password As String = param("password").ToString
    
    
        If Trim(userid) = "" Or authenticate(userid, password) = False Then
    
    
            Ext.Msg.Alert("Login Failure!", "Invalid Username or password!").Show()
    
    
        Else
    
    
            PMUSER.getEmployee(userid)
    
    
            Session("userid") = userid
    
    
            loginwin.Close()
    
    
        End If
    
    
    End Sub

    Thanks


    Lisa
  2. #2

    RE: Ajaxevent Request failure

    Can someone help i am lost ;)
  3. #3

    RE: Ajaxevent Request failure

    This line seems to be the problem:

    Ext.Msg.Alert("Login Failure!", "Invalid Username or password!").Show()
    Try this instead:

    Ext.Msg.Alert("Login Failure!", "Invalid Username or password!")
    Also, check in VS there are no syntax errors in your VB code inside [script> attribute.

Similar Threads

  1. Replies: 16
    Last Post: Oct 04, 2011, 5:17 PM
  2. Request Failure in Opera
    By Dgsoft.ru in forum 1.x Help
    Replies: 2
    Last Post: Jul 30, 2009, 5:37 AM
  3. Request Failure!
    By jachnicky in forum 1.x Help
    Replies: 8
    Last Post: Dec 11, 2008, 6:11 AM
  4. Request Failure!
    By jachnicky in forum 1.x Help
    Replies: 0
    Last Post: Dec 11, 2008, 3:26 AM
  5. Replies: 2
    Last Post: Nov 26, 2008, 12:17 PM

Posting Permissions