EasyUI Forum
May 19, 2024, 02:53:45 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: EasyUI windows setTitle not working  (Read 10537 times)
bakkers
Newbie
*
Posts: 21


View Profile Email
« 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?
Logged
jarry
Administrator
Hero Member
*****
Posts: 2264


View Profile Email
« Reply #1 on: July 01, 2015, 04:59:22 PM »

The 'setTitle' method can change the title of a window component. Please check your code carefully.
Logged
bakkers
Newbie
*
Posts: 21


View Profile Email
« Reply #2 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>
Logged
bakkers
Newbie
*
Posts: 21


View Profile Email
« Reply #3 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.
Logged
Aod47
Jr. Member
**
Posts: 83


View Profile
« Reply #4 on: September 24, 2015, 11:46:59 PM »

I found this problem too.

Please try.

Code:
$('#popUpForm').window({ title: 'Skift arbejdstid' });
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!