Forum


01:54

10/04/2009

Thank you for a tool that will be really useful when I become more familiar with it.
I think i have a pathing problem and would appreciate some assistance.
My file updtstaff.php contains:
jQuery(document).ready(function(){
jQuery("#list2").jqGrid({
// the url parameter tells from where to get the data from server
// adding ?nd='+new Date().getTime() prevent IE caching
url:'getstaff.php?nd='+new Date().getTime(),
getstaff.php gets the relevant records.
If I structure my directories as follows, the grid works complete with data
/site
/admin
updtstaff.php
getstaff.php
dbconfig.php
jquery.jqGrid.js
/js
/images
/themes
If I structure them as follows, I get the grid but no data in it.
/site
/admin
updtstaff.php
getstaff.php
dbconfig.php
/includes
/jqgrid
jquery.jqGrid.js
/js
/images
/themes
I suspect the problem to be with pathing pointing to getstaff.php as in
jQuery("#list2").jqGrid({
// the url parameter tells from where to get the data from server
// adding ?nd='+new Date().getTime() prevent IE caching
url:'getstaff.php?nd='+new Date().getTime(),
but changing this to ../../admin/getstaff.php and other variations does not work.
Regards
Murray
00:14

10/04/2009

Problem solved:
Despite the fact I am using PHP 5.1.6 it still seems to want JSON.php and therefore in getstaff.php needs
//since we want to use a JSON data we should include
//encoder and decoder for JSON notation
//If you use a php >= 5 this file is not needed
include("../includes/jqgrid/JSON.php");
Most Users Ever Online: 715
Currently Online:
60 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66