[CLOSED] Change Width of MessageBox on Client

  1. #1

    [CLOSED] Change Width of MessageBox on Client

    I am attempting to call the alert messagebox on the client, but the text I want to put into the box wraps kinda funny. Can you show me how to adjust the width on the client?

    <script type='text/javascript'>
        var bodyerror = 'Please enter a body';
        var requestorerror = 'Please enter a requestor';
        Ext.Msg.alert("Error", "Error saving ticket:<br /><br />" + bodyerror + requestorerror);
    </script>
    Last edited by Daniil; Feb 10, 2012 at 3:19 PM. Reason: [CLOSED]
  2. #2
    Hi,

    The width of a message box is adjusted correctly for me in the test case below.

    Please provide your sample to reproduce the problem.

    Example
    <%@ Page Language="C#" %>
     
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Ext.NET Example</title>
    
        <ext:ResourcePlaceHolder runat="server" Mode="ScriptFiles" />
        <script type='text/javascript'>
            var onReady = function () {
                var msg1 = 'Please enter a body', 
                    msg2 = 'Please enter a requestor';
    
                Ext.Msg.alert("Error", "Error saving ticket:<br /><br />" + msg1 + msg2);
            };
        </script>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server">
                <Listeners>
                    <DocumentReady Handler="onReady();" />
                </Listeners>
            </ext:ResourceManager>
        </form>
    </body>
    </html>
  3. #3
    On this one, can you just tell me if it is possible to adjust the width through a setting of the Alert on the client side? If so, how do you do it? I don't want to allow it to adjust automatically.
  4. #4
    There is no config option to set up width for the alert message box.
    http://docs.sencha.com/ext-js/3-4/#!...x-method-alert

    Though there is the show method:
    http://docs.sencha.com/ext-js/3-4/#!...ox-method-show
    where you could configure a message box as you wish, including setting up the width.
  5. #5
    ok, I'll try that thanks

Similar Threads

  1. [CLOSED] how to change the grid column width in client side?
    By leon_tang in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Mar 07, 2012, 7:36 PM
  2. [CLOSED] Change width Confirmation
    By CarWise in forum 1.x Legacy Premium Help
    Replies: 10
    Last Post: Jun 07, 2011, 2:19 PM
  3. [CLOSED] [1.0] CheckColumn width change broken
    By tdracz in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Jul 15, 2010, 12:58 PM
  4. [CLOSED] [1.0] Best way to change window width (client)
    By CarWise in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jun 17, 2010, 5:42 PM
  5. Replies: 0
    Last Post: Jan 12, 2010, 3:32 PM

Posting Permissions