EasyUI Forum
March 28, 2024, 04:31:16 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: $.messager.alert and z-index  (Read 17971 times)
bakkers
Newbie
*
Posts: 21


View Profile Email
« on: November 04, 2015, 11:51:36 PM »

Hello

I have a problem with a $.messager.alert and z-index.

I have opened up a easyui-window and from that windows i need to show a messager.alert, but the messager.alert gets a z-index behind the easyui-window. I can't figure out how to change that.

See the picture to get a idea of what i mean Smiley

Logged
aswzen
Sr. Member
****
Posts: 287


Indonesian

aswzen
View Profile WWW Email
« Reply #1 on: November 05, 2015, 12:55:58 AM »

try this bro

Code:
$.messager.alert({
     width:'200px',
     title:'Warning',
     content:'Warning to everybody oh yea',
     modal:true,
     zIndex:99999
});
Logged

Regards,
Sigit

- Indonesian jEasyUI Facebook page : https://www.facebook.com/groups/jeasyuiid/
bakkers
Newbie
*
Posts: 21


View Profile Email
« Reply #2 on: November 05, 2015, 01:28:38 AM »

try this bro

Code:
$.messager.alert({
     width:'200px',
     title:'Warning',
     content:'Warning to everybody oh yea',
     modal:true,
     zIndex:99999
});

That does the same thing, gets placed behind the window, and it actually gets z-index : 9002 so i think the script changes it somehow
Logged
aswzen
Sr. Member
****
Posts: 287


Indonesian

aswzen
View Profile WWW Email
« Reply #3 on: November 05, 2015, 01:38:22 AM »

which version of your easyui?

try to reduce the parent window zIndex..
Code:
$('#win').window({
    title: 'Kopier Fravaer',
    width:600,
    height:400,
    modal:false,
    zIndex:9000
});

function openWarning(){
$.messager.alert({
     width:'200px',
     title:'Warning',
     content:'Warning to everybody oh yea',
     modal:true,
     zIndex:99999
});
}
Logged

Regards,
Sigit

- Indonesian jEasyUI Facebook page : https://www.facebook.com/groups/jeasyuiid/
bakkers
Newbie
*
Posts: 21


View Profile Email
« Reply #4 on: November 05, 2015, 03:51:01 AM »

I'm using EasyUI 1.4.2

And if i change the zIndex of the window it stops working properly. And if i manuelly change the message.alert to a zIndex bigger then the windows the message.alert goes gray.

Maybe it's not ment to work together.
« Last Edit: November 05, 2015, 04:13:04 AM by bakkers » Logged
aswzen
Sr. Member
****
Posts: 287


Indonesian

aswzen
View Profile WWW Email
« Reply #5 on: November 05, 2015, 04:10:31 AM »

try to update with latest version Smiley
Logged

Regards,
Sigit

- Indonesian jEasyUI Facebook page : https://www.facebook.com/groups/jeasyuiid/
bakkers
Newbie
*
Posts: 21


View Profile Email
« Reply #6 on: November 05, 2015, 04:38:41 AM »

I just tried the latest version and it didn't help  Huh
Logged
bakkers
Newbie
*
Posts: 21


View Profile Email
« Reply #7 on: November 06, 2015, 01:02:32 AM »

I found out a way to make it work.

If i click on the window to select it, before i open the alert, it works, the only problem is that i manually have to double tap the header on the window to select it.

So how do i select the window through script so it's done automatically

Logged
jarry
Administrator
Hero Member
*****
Posts: 2260


View Profile Email
« Reply #8 on: November 06, 2015, 01:18:35 AM »

Please refer to http://jsfiddle.net/fy1e57y9/. It works fine.
Logged
bakkers
Newbie
*
Posts: 21


View Profile Email
« Reply #9 on: November 06, 2015, 01:18:51 AM »

I now found the right solution. I just moved the $('#popUpForm').window('open');   to a later stage in the process and now it's selected and the zIndex works Smiley
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!