Ext.Msg show is not working in first click of button

Page 1 of 2 12 LastLast
  1. #1

    Ext.Msg show is not working in first click of button

    Hello Danill

    I m using ext.MessageBoxConfig() with addscript on button click. when i clci kon button first time then it is not working but when i click on it second time then it shown properly. and also it is working properly on local machine (Coding environment) but when code goes to server then it getting problem.

    another one is "Transaction abort" windows is shown on click for that i use "ShowWarningOnAjaxFailure="false" " in master page then it worked. is there any relation with this.

    Thanks
    -Paddy
  2. #2
    Quote Originally Posted by paddy View Post
    Hello Danill

    I m using ext.MessageBoxConfig() with addscript on button click. when i clci kon button first time then it is not working but when i click on it second time then it shown properly. and also it is working properly on local machine (Coding environment) but when code goes to server then it getting problem.

    another one is "Transaction abort" windows is shown on click for that i use "ShowWarningOnAjaxFailure="false" " in master page then it worked. is there any relation with this.

    Thanks
    -Paddy
    I've notice that on some browsers, the Ext.Msg message pop-up gets hidden behind any other opened windows (especially in desktopwindow development).

    Also noticed that "Transaction Aborted" was happening on any event back to the server (ie: directevents) after just a few minutes of browser (IE 8 or Firefox 11.0) being idle (no user interaction). I've employed an ugly work around for now til I get a chance to revisit it later.

    Work around is below:
    <ext:TaskManager ID="TaskManager1" runat="server" AutoRunDelay="15000">
                    <Tasks>
                        <ext:Task Interval="45000">
                            <DirectEvents>
                                <Update OnEvent="TaskManager1_KeepAlive" />
                            </DirectEvents>
                        </ext:Task>
                    </Tasks>
    </ext:TaskManager>
    The TaskManager1_KeepAlive direct method on the server doesn't do anything, just an empty code block. I'm sure there's a solution, I just couldn't find it in any forum threads. Maybe the boys at EXT can comment on this. This calls back to the server every 45 seconds. And just to be clear, this was happening when developing with EXT's Desktop / DesktopWindow development, so this may not apply to you.
    Last edited by Daniil; Jul 02, 2012 at 7:00 PM. Reason: Please use [CODE] tags
  3. #3
    Hi @paddy,

    Quote Originally Posted by paddy View Post
    I m using ext.MessageBoxConfig() with addscript on button click. when i clci kon button first time then it is not working but when i click on it second time then it shown properly. and also it is working properly on local machine (Coding environment) but when code goes to server then it getting problem.

    another one is "Transaction abort" windows is shown on click for that i use "ShowWarningOnAjaxFailure="false" " in master page then it worked. is there any relation with this.
    Please provide a sample to reproduce. Which server do you use?
  4. #4
    Hi @healingnations,

    Quote Originally Posted by healingnations View Post
    I've notice that on some browsers, the Ext.Msg message pop-up gets hidden behind any other opened windows (especially in desktopwindow development).
    It would be great to look at the example to reproduce. A MessageBox should be in front. Please start a new forum thread.

    Quote Originally Posted by healingnations View Post
    Also noticed that "Transaction Aborted" was happening on any event back to the server (ie: directevents) after just a few minutes of browser (IE 8 or Firefox 11.0) being idle (no user interaction). I've employed an ugly work around for now til I get a chance to revisit it later.

    Work around is below:
    <ext:TaskManager ID="TaskManager1" runat="server" AutoRunDelay="15000">
                    <Tasks>
                        <ext:Task Interval="45000">
                            <DirectEvents>
                                <Update OnEvent="TaskManager1_KeepAlive" />
                            </DirectEvents>
                        </ext:Task>
                    </Tasks>
    </ext:TaskManager>
    The TaskManager1_KeepAlive direct method on the server doesn't do anything, just an empty code block. I'm sure there's a solution, I just couldn't find it in any forum threads. Maybe the boys at EXT can comment on this. This calls back to the server every 45 seconds. And just to be clear, this was happening when developing with EXT's Desktop / DesktopWindow development, so this may not apply to you.
    It looks to be a "keeping session alive" issue. Here you can find more details:
    http://forums.ext.net/showthread.php?17166
  5. #5
    Quote Originally Posted by Daniil View Post
    Hi @paddy,



    Please provide a sample to reproduce. Which server do you use?

    Hi Danill,

    I am using "Windows server 2003 R2 standard x64 edition". is there problem with this server


    Thanks
    -Paddy
  6. #6
    What is the version of IIS?
  7. #7
    Quote Originally Posted by Daniil View Post
    What is the version of IIS?
    IIS version is 6.0
  8. #8
    Well, everything should be ok.

    Please provide a sample.
  9. #9
    Quote Originally Posted by Daniil View Post
    Well, everything should be ok.

    Please provide a sample.
    Master page Code
    <%@ Master Language="VB" AutoEventWireup="true" EnableViewState="true" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:asp="http://microsoft.com/2005/aspnet">
    <head id="Head1" runat="server">
           <asp:ContentPlaceHolder ID="ScriptPlaceHolder" runat="server" />  
    </head>
    <body runat="server" id="MainBody">
        <ext:ResourceManager ID="ResourceManager1" runat="server" ShowWarningOnAjaxFailure="false">
        </ext:ResourceManager>
        <div align="center">
            <table width="950" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF">
                            
                <tr valign="top">
                    <td class="BodyCopy" valign="top">
                        <table width="100%">
                            <tr valign="top">
                                <td>
                                    <font color="a6a4aa">
                                        <%=HEADER_FOOTER%></font>
                                    <table width="100%" cellpadding="0" align="left">
                                        <tr align="left">
                                            <td align="left" class="bodycopy">
                                                
                                                <asp:contentplaceholder id="Child1" runat="server">
                                                </asp:contentplaceholder>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
             </table>
        </div>
    </body>
    </html>

    index.aspx page

    <%@ Page Language="VB" AutoEventWireup="false" CodeFile="index.aspx.vb" Inherits="Password_ExtPassword"
        MasterPageFile="index.master" %>
    
    <%--This Extnet important line for adding the Ext.net dll. prefix with <ext:..> will be Extnet controls--%>
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="ScriptPlaceHolder">
       
    </asp:Content>
    <asp:content id="Content1" runat="server" contentplaceholderid="Child1">
        <form id="form1" action="index.aspx" runat="server">
        <asp:hiddenfield id="clientSideIsPostBack" runat="server" />
        <div id="divTop" runat="server">
            <asp:label id="lblForget" runat="server" cssclass="HeadingUser" text="Mail Password" />
                   
            <%--This is Extnet button is working like <asp:Button>,this button is with image/icon--%>
            <ext:Button ID="btnPassWord" runat="server" Text="Email My Password" Width="124px"
                IconCls="email" TabIndex ="3">
            </ext:Button>
                    
        </div>
        
        </form>
    </asp:content>
    index.aspx.vb

    Imports Ext.Net
    Imports System.Data
    Imports System.Web.UI.HtmlControls
    Imports System
    
    
    Partial Class Password_ExtPassword
        Inherits System.Web.UI.Page
        Private blnSendEmail As Boolean = False
        Public win As New MessageBoxConfig()
    
        Protected Sub form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles form1.Load
            If IsPostBack = False Then
                clientSideIsPostBack.Value = "N"
            End If
            'if Database is Off Then Dispalys database off page
            
            'End If
        End Sub
    
        Protected Sub btnPassWord_DirectClick(ByVal sender As Object, ByVal e As Ext.Net.DirectEventArgs) Handles btnPassWord.DirectClick
            win.Title = "Sending Email"
            win.Message = "Your request is being processed . . ."
            win.Width = 300
            win.Wait = True
            win.WaitConfig.Interval = 150
            win.IconCls = "msg"
    
            'Checking Whether selected FirstName and Last Name
           
            'Some database checking functions
            
            If strEmail <> "" Then
                '***SEND EMAIL ****
    
                'send Mail in text Format
                'mail sending code is here
                clientSideIsPostBack.Value = "Y"
                ExtNet.Msg.Show(win)
                btnPassWord.AddScript("setTimeout(function () { Ext.MessageBox.hide();Ext.MessageBox.alert('Email Send', 'Your password has been sent successfully!');}, 4000);")
                'ExtNet.Msg.Alert("Email Message", " Your password has been sent Successfully").Show()
            End If
    
        End Sub
    
    End Class
  10. #10
    I am getting
    Compiler Error Message: BC30451: 'strEmail' is not declared. 
    It may be inaccessible due to its protection level.
    Please ensure the code is runnable.
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 4
    Last Post: Jul 17, 2012, 10:33 PM
  2. ext button click asp:gridiew footer row will be show
    By landerajshree in forum 1.x Help
    Replies: 5
    Last Post: Jul 03, 2012, 10:45 AM
  3. Replies: 4
    Last Post: Nov 19, 2010, 2:39 PM
  4. Replies: 4
    Last Post: Sep 17, 2010, 11:33 PM
  5. Replies: 10
    Last Post: Aug 18, 2010, 3:22 AM

Posting Permissions