Tmh
Tmh

Reputation: 1511

ExtJS 4: Close button is not visible for messageBox

I am new to ExtJs. When I run the following code, it displays message prompt but the close button at the top right corner of prompt is not visible, but when I click at the top right corner, the box getting closed.

<html>
<head>
    <title>Getting Started </title>
    <link rel="stylesheet" type="text/css" 
        href="lib/extjs/resources/css/ext-all.css"/>
    <script src="lib/extjs/adapter/ext/ext-base.js"></script>
    <script src="lib/extjs/ext-all-debug.js"></script>
    <script>
    Ext.onReady(function(){
        Ext.Msg.prompt('Name', 'Please enter your name:', function(btn, text){
                if (btn == 'ok'){
                    Ext.Msg.alert('Status', 'You Okayed it: '+text);
                }else{
                Ext.Msg.show({
                    title: 'Hello',
                    msg: 'you cancelled it: Mr:'+text,
                    buttons: Ext.Msg.YESNOCANCEL,
                    animEl: 'elId'
                });
            }
        });
    });
    </script>
</head>
<body>
<!--Nothing to Display -->
</body>
</html>

Screenshot

Upvotes: 2

Views: 1643

Answers (1)

sra
sra

Reputation: 23973

Your error is not reproduceable. If I take your code and run it the close button is shown.

    Ext.Msg.prompt('Name', 'Please enter your name:', function(btn, text){
            if (btn == 'ok'){
                Ext.Msg.alert('Status', 'You Okayed it: '+text);
            }else{
            Ext.Msg.show({
                title: 'Hello',
                msg: 'you cancelled it: Mr:'+text,
                buttons: Ext.Msg.YESNOCANCEL,
                animEl: 'elId'
            });
        }
    });

JSFiddle

Upvotes: 1

Related Questions