Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Grid but no data
10/04/2009
01:54
Avatar
murray
New Member
Members
Forum Posts: 2
Member Since:
10/04/2009
sp_UserOfflineSmall Offline

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

12/04/2009
00:14
Avatar
murray
New Member
Members
Forum Posts: 2
Member Since:
10/04/2009
sp_UserOfflineSmall Offline

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");

Forum Timezone: Europe/Sofia

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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information