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
Problem getting $limit value on PHP file
22/04/2009
13:25
Avatar
pr0
Member
Members
Forum Posts: 6
Member Since:
27/03/2009
sp_UserOfflineSmall Offline

i have the following code to build grid:

jQuery("#grid").jqGrid({
        url:'.....',
        datatype: "json",
        colNames:[ ........],
        colModel:[ ........  ],
        rowNum:5,
        altRows:true,
        imgpath: gridimgpath,
        mtype: "POST",
        pager: jQuery('#pager'),
        sortname: 'oferta',
        viewrecords: true,
        caption:"Cargas",
        hidegrid: false,
        width: 800,
        height: 300,
        multiselect: false,
        loadui:"disable",
        sortorder: "asc"
    }).navGrid("#pager",{search:false,edit:false,add:false,del:false,refresh:false});

All ok, but when i try to get the rowNum in a PHP file i get an empty value:

$page = $_GET['page']; // get the requested page
$limit = $_GET['rows']; // THIS VAR GET EMPTY VALUE
$sidx = $_GET['sidx']; // get index row - i.e. user click to sort
$sord = $_GET['sord']; // get the direction

Anybody can help me?

Thx, regards!

23/04/2009
02:35
Avatar
xuding
xuding
Member
Members
Forum Posts: 36
Member Since:
15/11/2008
sp_UserOfflineSmall Offline

can u post your php code here ?

23/04/2009
04:18
Avatar
pr0
Member
Members
Forum Posts: 6
Member Since:
27/03/2009
sp_UserOfflineSmall Offline

Its really neccesary post all PHP code?

At top of my file i have:

$page = $_GET['page']; // get the requested page
$limit = $_GET['rows']; // get how many rows we want to have into the grid
echo “limit: “.$limit;
$sidx = $_GET['sidx']; // get index row - i.e. user click to sort
$sord = $_GET['sord']; // get the direction

rest of code here…

i printed $limit var and i get a empty value.

EDIT:

I tested all grid vars ($page, $limit, $sidx, $sord) and all post empty values at PHP file.

My actual PHP file is:

$page = $_GET['page'];
echo “page: “.$page;
$limit = $_GET['rows'];
echo “limit: “.$limit;
$sidx = $_GET['sidx'];
echo “sidx: “.$sidx;
$sord = $_GET['sord'];
echo “sord: “.$sord;

Regards

23/04/2009
06:44
Avatar
xuding
xuding
Member
Members
Forum Posts: 36
Member Since:
15/11/2008
sp_UserOfflineSmall Offline

so the data is not posted out from your grid ?

23/04/2009
09:02
Avatar
pr0
Member
Members
Forum Posts: 6
Member Since:
27/03/2009
sp_UserOfflineSmall Offline

Fixed! omg small error are the more difficult. I have mtype: POST at grid config and my PHP file use $_GET method haha

Thx all, regards.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
89 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