jQWidgets Forums
Forum Replies Created
-
Author
-
body><div style="width:inherit;margin-left:100px"> <div> <a href="#"> <div></div> </a> <!--Place menu here--> </div> <!--Line chart graph begins here --> <div> </div> <!--Line chart graph ends here --></div>
<?php if(!isset($_SESSION)) session_start();?><!DOCTYPE html><html><head><title>Home::J.K. Horgle Transport Ltd</title><meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /><link href="css/admin.css" rel="stylesheet" type="text/css" /><!-- provides menu--><link rel="stylesheet" href="js/jqwidgets/styles/jqx.base.css"type="text/css" /><link rel="stylesheet" href="js/jqwidgets/styles/jqx.energyblue.css" type="text/css" /><!--provides jqwidgets scripts--><script type="text/javascript" src="js/scripts/jquery-1.7.2.min.js"></script><script type="text/javascript" src="js/jqwidgets/jqxcore.js"></script><script type="text/javascript" src="js/jqwidgets/jqxbuttons.js"></script><script type="text/javascript" src="js/jqwidgets/jqxvalidator.js"></script><script type="text/javascript" src="js/scripts/gettheme.js"></script><script type="text/javascript"> $(document).ready(function () {var theme = 'energyblue';$("#Loginbutton").jqxButton({ width: '150', height: '30', theme: theme });$('#Loginbutton').bind('click', function () { $('#login_form').jqxValidator('validate');});$('#login_form').jqxValidator({ rules: [ { input: '#user_id', message: 'E-mail is required!', action: 'keyup', rule: 'required' }, { input: '#user_id', message: 'Invalid e-mail!', action: 'keyup', rule: 'email' }, { input: '#p_id', message: 'Password is required!', action: 'keyup', rule: 'required' }, ], theme: theme });$('#login_form').jqxValidator({ onSuccess: function () { $('#login_form').submit();} });});</script></head><body><div id="main"> <div id="header"> <a href="#" class="logo"> <div id="mainlogo"></div> </a> </div> <div class="top-bar" style="border:none; width:650px; margin-right:250px;"> <h1>J.K. HORGLE TRANSPORT LTD</h1> </div> <div id="middle" > <div id="left-column"></div> <div id="center-column" style="width:500px; height:350px; margin-top:10px;"> <div class="top-bar" style="border:none;"> <h1>Login Page</h1> </div> <div class="select-bar"></div> <div id="login"> <form method="post" id="login_form" action="phpfiles/login.php"> <table width="250" cellpadding="5" style="font-size:15px; padding:0;"> <tr><td colspan="2" style="font-size:12px; color:#F00;"><?php //echo $_SESSION['error'];//$_SESSION['error'] =""?></td> </tr> <tr> <td width="128" align="right"><label>Email: </label></td> <td width="268"><input type="text" size="30" name="user" id="user_id" class="txt"/></td> </tr> <tr> <td align="right"><label>Password: </label></td> <td><input type="password" size="30" name="p" id="p_id" class="txt" /></td> <tr> <td></td> <td align="right"><button type="button" value="Login" id="Loginbutton">Login</button></td> </tr> </table> </form> </div> </div> </div> <div id="footer"> <hr /> <p>Copyright@J.K. Horgle Transport Ltd 2012::Developed by Lawrence Ameku</p> </div></div></body></html>
Here is the sample code for my login page and this is how I have validate almost all my pages. Only internet explorer gives this error….
Thank you..It is working now… i found the error in my codes. The error was in my url
var url = '../php/grid.php&searchTrip=true&searchTripNumber=' + searchTripNumber;var url = '../php/grid.php?searchTrip=true&searchTripNumber=' + searchTripNumber;
there should be a question mark(?) after the ../php/grid.php before the payload follows.
Hi Peter problem still persist. below is my implementation
$('#buttonSearchTrip').bind('click', function () { $('#searchTripForm').jqxValidator('validate'); }); $('#searchTripForm').jqxValidator({ rules: [ { input: '#searchTripNumber', message: 'Trip number is required!', action: 'keyup', rule: 'required' }, ], theme: greyTheme }); $('#searchTripForm').jqxValidator({ onSuccess: function () { var searchTripNumber = $('#searchTripNumber').val(); var url = '../php/grid.php&searchTrip=true&searchTripNumber=' + searchTripNumber; source = { datatype: "json", datafields: [ { name: 'tripNumber' }, { name: 'BRVNumber'}, { name: 'loadingDate'}, { name: 'loadingDepot'}, { name: 'OMC'}, { name: 'productLoaded'}, { name: 'roadExpenses'}, { name: 'kilometers'}, { name: 'wayBillNumber'}, { name: 'customer'}, { name: 'destination'}, { name: 'quantityShipped'}, { name: 'remark'}, { name: 'returnDate'}, { name: 'topUp'}, { name: 'meterLosses'} ], id: 'tripCode', url: url, root: 'data' }; dataAdapter = new $.jqx.dataAdapter(source); $("#tripGrid").jqxGrid({ source: dataAdapter }); } });
Peter, the code is to respond to a click event and please know that the grid have been loaded already when the page loads so the columns and all that have been setup and the grid is working good. I want to feed the grid with data returned by the new url.
Please put your recommendations forward.
thanksWow that is how i did it in the first place and it did not work lol… but i would like to share this so others can get to use it if they do need.
First I set the entire grid to editable:true and next i set all columns that need to be readonly to editable:false.
This is how it worked for me. The other way of setting the entire grid editable:false and setting up columns that can be modified to editable:true did not work for me. So when you set up your grid you can switch to see which one works for you…
ThanksI hop you do understand what am talking about. the grid have already be established and is working… what i want is, if a to give new data content with the the same format as how the grid was loaded initially.
Hello,
The grid am talking about is already working… I want to just update the source so the grid can reload with new data but the field and all that is there remain the same only that the data content is different. Actually what am doing is to implement a search so for the gird{ text: 'Product', columntype: 'dropdownlist', datafield: 'productname', width: 177, createeditor: function (row, cellvalue, editor) { var dataSource = ['Cappuccino', 'Caramel Latte', 'Caffe Espresso']; editor.jqxDropDownList({source: dataSource }); }}
Hello,
1. You suggested the above code when I asked for ways to link a dropdownlist in a grid to another table.. I tried it but it failed. I have spent days trying to figure it out but it is not just working..2. I want to enable search in a dropdownlist, so when a user start typing the dropdwonlist will auto complete it.. I dont see anything like that in the API which will enable a user start typing as the dropdownlist is readonly
thank you
Peter I have perfectly understood now. Indeed theory is the framework on which practice is built. You have the laid the foundation and it worked fine. Now my records are saving. I have another problem should past it or should I create a new topic as i want others to also follow because I know others are facing the same problems.
THANK YOUI have tried all I could and I cannot see where my problem lies. Peter Please look at this code because my head is starting to blow off. I have spent two days with this code and I cannot seem to see where the error is.
The only problem I have is that the update: function(rowid, rowdata) is not responding. I have tried to place and alert at the very top to ensure that at least it is been called and is the fault of my php code yet the alert does not pop up.Peter please help me out.. please
Hello Peter,
I followed the example and came out with that code… yet i cannot see where the problem is coming from so take a loot at the code above and comment on the possible errors for me please.
The the problem is that all other functions including the delete is working but the update and add functions are not working
addrow: function (rowid, rowdata)
updaterow: function (rowid, rowdata)please loot at these functions for ya.
Thanks
Anytime I paste the code I have implemented, the codes are truncated and only halve of it appears… May please help me out with a sample code of this multiline textarea.
counting your consideration please
thanks'' + value + '';
Please is there a way you can demonstrate this to me. I have to tried to implement the textarea using CSS but it does not work. I have tried to render it using the code below but the cells seems not be expanding interms of number of rows..
“” + value + ”;”
Is there another way i could do this other than what i have done…
this was the code i used but anytime i past it does not appear
” + value + ”; -
AuthorPosts