WinJS using alert() in your JavaScript

WinJS using alert() in your JavaScript

Rate This
  • Comments 1

If you come from JavaScript world you will badly miss the alert() function. However, this habit can be entertained if you declare a function at default.js file. Then it will be accessible in all other pages which are navigated from default.html page.

function alert(message) {
    var msgBox = new Windows.UI.Popups.MessageDialog(message);

Then this code would work,

alert('Welcome back dear Alert');


Leave a Comment
  • Please add 7 and 5 and type the answer here:
  • Post
  • With the major difference that it won't block as alert() does...

Page 1 of 1 (1 items)