EasyUI Forum
April 27, 2024, 11:24:52 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: JScript runtime error: Unable to get value of the property 'alert':  (Read 7182 times)
sdyson31
Newbie
*
Posts: 8


View Profile
« on: May 29, 2015, 10:18:53 AM »

I am getting following error when using message alert.

0x800a138f - Microsoft JScript runtime error: Unable to get value of the property 'alert': object is null or undefined


 function ShowPopup(title, message, type) {
         $(function () {

             if (typeof type === "undefined") {
                 type = '';
             }
             $.messager.alert({
                 title: title,
                 msg: message,
                 icon: '',
                 width: 550
             })
         });
     };


Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: May 29, 2015, 05:42:58 PM »

The code below works fine.
Code:
             $.messager.alert({
                 title: title,
                 msg: message,
                 icon: '',
                 width: 550
             })

Please check your code carefully.
Logged
sdyson31
Newbie
*
Posts: 8


View Profile
« Reply #2 on: May 30, 2015, 04:51:39 PM »

Is easyui compatible with jquery 2.1.1 ?
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #3 on: May 30, 2015, 05:56:43 PM »

Yes, please refer to http://jsfiddle.net/hbwqb85h/
Logged
sdyson31
Newbie
*
Posts: 8


View Profile
« Reply #4 on: May 31, 2015, 10:10:08 AM »

It is not working on asp.net master page.

I have added the following function on master page but it doesn't work.

function show() {
    $.messager.show({
        title: 'My Title',
        msg: 'Message will be closed after 4 seconds.',
        showType: 'show'
    });
}

Jquery UI dialog works great on master page but not $.messager.show.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!