Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to show alert in extjs?

Tags:

extjs

While executing the following code in browser it will not shown an alert, its just shown empty page. anything wrong in the following code please help me.

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text.html; charset=utf-8">

<title> First Program </title>

<link rel="stylesheet" type="text/css" href ="http://localhost:8080/ext/ext-4.2.1.883/resources/css/ext-all.css"/>
<script type = "text/javascript" src = "http://localhost:8080/ext/ext-4.2.1.883/ext-all-dev.js"/>

<script type="text/javascript">
    Ext.onReady(function(){
        //  alert("We are ready to go!");
        Ext.Msg.alert("Hello World");
    });
</script>
</head>
<body>

</body>
</html>
like image 346
praveen Avatar asked Oct 02 '13 18:10

praveen


1 Answers

You are not calling the method properly. Ext.Msg.alert takes two parameters, title and message, as you can see in the docs.

like image 107
Lorenz Meyer Avatar answered Sep 23 '22 16:09

Lorenz Meyer