[CLOSED] Ext.Msg.Show Configuration

  1. #1

    [CLOSED] Ext.Msg.Show Configuration

    I configured Ext Message like below to get name from user and validating on ok button. i would like to retain the msg box if validation fails.
    Can you tell me how to do this?

    sample code:-
    
    <%@ Page Language="C#"%>
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
        <script type="text/javascript">
            function GetUserName() {
                Ext.Msg.show({
                    title: 'Enter Name',
                    msg: "<input type='text' id='userNameTxt'>",
                    buttons: { ok: "Ok", cancel: "Cancel" },
                    fn: function (btn) { return GetUserNameHandler(btn); }
                });
            }
    
            function GetUserNameHandler(btn) {
                if (btn == 'ok' && document.getElementById('userNameTxt').value == '') {
                    return false;
                }
            }
        </script>
    </head>
    
    <body>
        <form id="form1" runat="server">
        <ext:ResourceManager ID="ResourceManager" runat="server"></ext:ResourceManager>
        <div>
            <button onclick="GetUserName()">Click</button>
        </div>
        </form>
    </body>
    </html>
    Last edited by Daniil; Dec 01, 2011 at 3:12 PM. Reason: [CLOSED]
  2. #2
    Hi,

    No way. A Msg window is closed after click on a button.

    I can suggest to use a common Window with a TextField. And use its validation mechanism to disable/enable a button.
  3. #3
    Ok Thanks Daniil.

Similar Threads

  1. [CLOSED] Calendar region configuration
    By Pablo_Azevedo in forum 1.x Premium Help
    Replies: 1
    Last Post: Dec 26, 2011, 11:20 AM
  2. Configuration Error
    By fabiomarcos in forum 1.x Help
    Replies: 5
    Last Post: Feb 09, 2010, 8:21 AM
  3. [CLOSED] DateField - Configuration / Setup
    By stevenoc in forum 1.x Help
    Replies: 17
    Last Post: Oct 27, 2009, 2:08 PM
  4. VIEWSTATE configuration independent
    By Pablo in forum Feature Requests
    Replies: 4
    Last Post: Oct 06, 2009, 2:30 PM
  5. [CLOSED] configuration problem come in!
    By supermanok in forum 1.x Help
    Replies: 3
    Last Post: Dec 08, 2008, 11:29 PM

Tags for this Thread

Posting Permissions