stworthy,
I was able to embed the JS and CSS files into my mobile app and use just the following in a html container/wrapper. This works great and it updates to my server hosting the MySQL db. Now what I was trying to explain is that I want to be able to use the easyui functions to render the dg, dlg, fm items in javascript. Then I will be able to use the easyui functions and not use the html grid to display, add, edit the records. I can use screens to do this. SO the main item needed would be to get the records from the server in an array so I could display through the screens.
Thanks
Howard
<body>
<table id="dg" title="My Users" class="easyui-datagrid" style="width:auto;height:auto"
url="
http://www.mysite.com/mobione/phone/get_users.php"
toolbar="#toolbar" pagination="true"
rownumbers="true" fitColumns="true" singleSelect="true">
<thead>
<tr>
<th field="firstname" width="40">First Name</th>
<th field="lastname" width="40">Last Name</th>
</tr>
</thead>
</table>
<div id="toolbar">
<a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="newUser()">New User</a>
<a href="#" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="editUser()">Edit User</a>
<a href="#" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="removeUser()">Remove User</a>
</div>
<div id="dlg" class="easyui-dialog" style="width:auto;height:auto"
closed="true" buttons="#dlg-buttons">
<div class="ftitle">User Information</div>
<form id="fm" method="post" novalidate>
<div class="fitem">
<label>First Name:</label>
<input name="firstname" class="easyui-validatebox" required="true">
</div>
<div class="fitem">
<label>Last Name:</label>
<input name="lastname" class="easyui-validatebox" required="true">
</div>
<div class="fitem">
<label>Phone:</label>
<input name="phone">
</div>
<div class="fitem">
<label>Email:</label>
<input name="email" class="easyui-validatebox" validType="email">
</div>
</form>
</div>
<div id="dlg-buttons">
<a href="#" class="easyui-linkbutton" iconCls="icon-ok" onclick="saveUser()">Save</a>
<a href="#" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#dlg').dialog('close')">Cancel</a>
</div>
</body>
This is what I use for building the list for SQLite in an app. I am trying to do this using easyui functions to extract the data from the server to be able to use in the app till need to add, update, remove and so on and then use the php files on the server to do this.
//build list css class list
cssClassList = i==0 ? firstItemClass : '';
cssClassList += i==itemCnt ? lastItemClass : '';
cssClassList += internalItemClass;
// checks the size and adds the ... if too long to display
var nameSize = results.rows.item(i).dlname;
var nameLimit = nameSize.length;
if (nameLimit > 20) {nameTrim = nameSize.slice(0,20)+ '...';}
else {nameTrim = nameSize;}
// on the textcheck I use this for the id and have it hidden
list.append(
'<li id="m1-list-listItem1" class="' + cssClassList + '"' +
' data-action-click-id="action0" data-listitem-index="' + i + '">'+
' <div id="m1-list-listItem1-inner-div">'+
' <img id="m1-list-accessoryImage1" class="m1-clickable" '+
' src="res/images/tableRowDisclosureIndicator.png"/>'+
' <div id="m1-list-text2" class="m1-text">'+ nameTrim + ' - ' + results.rows.item(i).dltype +'</div>'+
' <div id="m1-list-textcheck" style="visibility:hidden">'+ results.rows.item(i).id +'</div>'+
' </div>'+
'</li>');
}
});
});