EasyUI Forum
September 13, 2025, 04:39:46 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: panel inside panel  (Read 6978 times)
crosemffet
Jr. Member
**
Posts: 68



View Profile WWW Email
« on: January 19, 2016, 04:04:10 AM »

hello everybody, and thanks in advance for your support.!
I'm trying to make one chat window. as you probably know, chat window has 2 zones, the top one for the text display, and the bottom one for the operator to write its own content to chat.
so, I have one main panel, and inside the main panel 2 panels, one for the top one and the second one for the bottom one. for any reason my code is not working. can anybody help me with that? here is my code:
------------
<?php
$bottom_panel = "<div id=write1 class=\"easyui-panel\" title=\"My Panel\" style=\"width:100px;height:100px;padding:10px;\">";
$bottom_panel .= "<p>my text.<p>";
$bottom_panel .= "</div>";
echo "<script>";
echo "$('#channel' + $channel).html('".$bottom_panel."');";
echo '$("#write1").css("top", "100px");';
echo '$("#write1").css("left", "10px");';
echo '$("#write1").css("position", "absolute");';
echo "</script>";
?>
----------
the bottom_panel shows, in proper top and left position, but shows without title, borders, etc, shows like plain text "my text".
how can I put in easy way one panel inside another, and keep its properties right?. I will need to put many panels inside others to make a real chat window...
thanks in advance,
------------------
new comment added: I've discover something. if I create the code from the original html source page, everything goes wrong.
the problem is: I crete a div, and then call a function in php, that try to populate the div html content with the panel. when i do this, the div populates but the panel lose your properties like border, title, etc, it only shows text........
« Last Edit: January 19, 2016, 05:07:40 AM by crosemffet » Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: January 19, 2016, 06:23:37 AM »

You need to create the panel after calling 'html()' to fill a div with content.
Code:
$('#channel').html(...);
$('#write1').panel({
style:{
position:'absolute',
top:'100px',
left:'10px'
}
});
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!