|
Title: EasyUI windows setTitle not working Post by: bakkers on July 01, 2015, 02:04:23 AM Hello
I have a problem with easyUI window, when i set the title by default it works fine, but i need to set i dynamically and i can't get that to work. I have a window called popUpForm and when i call open on this window i also do this $('#popUpForm').window('setTitle','My New Title'); <-- But this dosn't work for me and changes nothing. What am i doing wrong? Title: Re: EasyUI windows setTitle not working Post by: jarry on July 01, 2015, 04:59:22 PM The 'setTitle' method can change the title of a window component. Please check your code carefully.
Title: Re: EasyUI windows setTitle not working Post by: bakkers on July 01, 2015, 10:53:07 PM The 'setTitle' method can change the title of a window component. Please check your code carefully. Here is my code for opening the window and centering it on screen. $('#popUpForm').load('../ajax/skiftArbejdstid.php', { medarb1: node.id, medArbNavn1: node.navn, getDate: getDate, klokken: getTime }, function() { $('#popUpForm').window('setTitle','Skift arbejdstid'); $('#popUpForm').window('open'); $('#popUpForm').window('center'); }); And here is my init of the window <div id="popUpForm" class="easyui-window" style="width:750px;height:700px" data-options="modal:true, left:-1000,top:-1000, closed:false"> <div class="easyui-layout" data-options="fit:true"> </div> </div> Title: Re: EasyUI windows setTitle not working Post by: bakkers on July 02, 2015, 05:51:42 AM I've found the problem, but haven't got a solution yet.
I have 2 files. file1.php and in that file i have my definition of the easyui-window. file2.php is called by a ajax call from file1.php. In file2 i need the jquery.easyui.min.js script and it's what gives me the problem. If i don't include the title is set fine but when i include the script the title is set but the window gets refreshed when the jquery.easyui.min.js is finished loading and thereby resetting the title. Title: Re: EasyUI windows setTitle not working Post by: Aod47 on September 24, 2015, 11:46:59 PM I found this problem too.
Please try. Code: $('#popUpForm').window({ title: 'Skift arbejdstid' }); |