EasyUI Forum
September 14, 2025, 02:59:04 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: Nested Dialog Form  (Read 13476 times)
putusundika
Newbie
*
Posts: 13


View Profile Email
« on: July 01, 2012, 08:24:40 PM »

dear all, please help. I totally newbie with EasyUI but starting to enjoy Smiley

i follow the example :

Code:
function newData(){
 $('#dlg').dialog('open').dialog('setTitle','New Data');
 $('#fm').form('clear');
 url = 'modul/mod_part/save_data.php';
}

<a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="newData()">New Data</a>

<div id="dlg" class="easyui-dialog" style="width:650px;height:350px;padding:10px 20px" closed="true" buttons="#dlg-buttons">
 <div class="ftitle">Master Parts</div>
  <form id="fm" method="post" novalidate>
    <div class="fitem" align="left">
        <p><label>Category</label>
         <input name="id_part_cat_part" style="width:100px" class="easyui-combobox"
              url="modul/mod_part/part_cat.php"valueField="id_part_cat" textField="name_part_cat" required="true"> </input>
         </p>

....

I'm using PHP and MySQL, so far its work.

so every time i click Add New button, dialog form will show up with combobox.

Now, my problem is :
if the items is not in list, i want to open another dialog form to add new item to the combobox. So, i need open 2 dialog form whichis nested.
how can i do that ?
or maybe any complete simple example for this ?

sorry for typo and my bad english

regards

Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: July 02, 2012, 02:23:22 AM »

Why to open another dialog form to add new item to the combobox? The combobox data has been loaded via 'modul/mod_part/part_cat.php'.
Logged
putusundika
Newbie
*
Posts: 13


View Profile Email
« Reply #2 on: July 02, 2012, 06:38:35 AM »

thnks for reply n support stworthy

my combo box refer through file modul/mod_part/part_cat.php to table(name_part_cat) which is has 2 fields : id_part_cat and name_part_cat. none of these fields allows to empty (both required).

part_cat.php :
Code:
 $rs = mysql_query("select * FROM part_cat order by name_part_cat ASC");
 $items = array();
 while($row = mysql_fetch_object($rs)){
array_push($items, $row);
 }
echo json_encode($items);

does "The combobox data has been loaded .." means :  i just typing directly new item inside combo box ?

best regards



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!