EasyUI Forum
May 16, 2024, 04:28:49 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: window title problem  (Read 10074 times)
crosemffet
Jr. Member
**
Posts: 68



View Profile WWW Email
« on: December 23, 2012, 05:29:04 AM »

I'm trying to open a help window, and then set the title, according to the window contents ajax loaded.
the code is:
main page:
<div id="whelp" class="easyui-window" closed="true" data-options="modal:true" style="width:600px;height:600px;padding:10px;"></div>
<script>
$('#whelp').window({
    collapsible:false,
    minimizable:false,
    maximizable:false,
   resizable:false,
   draggable:false
})

function showHelp(data){
   $('#whelp').window('open');
   $('#whelp').window('refresh', 'myURL.php?id=' + data);
}
</script>

then, myURL.php code is:
<?php
echo $myHelpText;
?>
<script>
$('#whelp').window({title: "myNewTitle"});
</script>
the windows open, but then closed suddenly.
the problem was in the title line inside the script tag.
if I comment it, everything goes right.
what's wrong with the title line...?
thanks in advance,
regards,
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: December 23, 2012, 06:48:44 AM »

To change the window title, please use 'setTitle' method instead.

$('#whelp').window('setTitle','myNewTitle');
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!