1. #1
    Sencha User
    Join Date
    Mar 2012
    Location
    Chennai, India
    Posts
    71
    Vote Rating
    2
    Answers
    7
    a.premkumar is on a distinguished road

      0  

    Default Answered: I have problem with Ext.Msg.alert

    Answered: I have problem with Ext.Msg.alert


    I am trying to use ExtJS' message alert to show a text.This is the code that I am using
    Code:
    Ext.onReady(function()
            {
                var type = document.getElementById("type").value;
                Ext.Msg.alert(type);
            });
    where 'type' is a hidden field. When I run this code I get the following message on console.

    What am I doing wrong here?

  2. If you're using ext-debug.js then it may not have loaded Ext.window.MessageBox.

    You could try using ext-all-dev.js or adding an Ext.require for MessageBox.

  3. #2
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,616
    Vote Rating
    327
    Answers
    545
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      1  

    Default


    If you're using ext-debug.js then it may not have loaded Ext.window.MessageBox.

    You could try using ext-all-dev.js or adding an Ext.require for MessageBox.

  4. #3
    Sencha User metalinspired's Avatar
    Join Date
    Apr 2012
    Posts
    98
    Vote Rating
    4
    Answers
    4
    metalinspired is on a distinguished road

      0  

    Default


    you must specify at least two string parameters (title and message) when calling .alert()

  5. #4
    Sencha User
    Join Date
    Mar 2012
    Location
    Chennai, India
    Posts
    71
    Vote Rating
    2
    Answers
    7
    a.premkumar is on a distinguished road

      0  

    Default


    Thank you skirtle. It worked.

  6. #5
    Sencha User
    Join Date
    Mar 2012
    Location
    Chennai, India
    Posts
    71
    Vote Rating
    2
    Answers
    7
    a.premkumar is on a distinguished road

      0  

    Default


    Quote Originally Posted by metalinspired View Post
    you must specify at least two string parameters (title and message) when calling .alert()
    But that would not be a problem here. If only one param is provided, the message box takes it as the title, shows an alert with given text and empty body.

  7. #6
    Sencha User metalinspired's Avatar
    Join Date
    Apr 2012
    Posts
    98
    Vote Rating
    4
    Answers
    4
    metalinspired is on a distinguished road

      0  

    Default


    Not documented so its new to me

  8. #7
    Sencha User
    Join Date
    Mar 2012
    Location
    Chennai, India
    Posts
    71
    Vote Rating
    2
    Answers
    7
    a.premkumar is on a distinguished road

      0  

    Default


    Quote Originally Posted by metalinspired View Post
    Not documented so its new to me
    Well that happens every time while learning technologies .