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
invalid assignment left-hand side
06/02/2010
03:21
Avatar
phamtranquocviet
Member
Members
Forum Posts: 22
Member Since:
06/02/2010
sp_UserOfflineSmall Offline

Hi,

The grid's interface displays ok. However, I can't figure out why the error in bold below shows up in Firebug when the data from ajax call returns:

invalid assignment left-hand side
[Image Can Not Be Found] 'page' => 1,n

Here is my js code for the grid:

$("#training").jqGrid
(
    {   
        url:'index.php?func=trainingmgr&aAction=loadData',
        datatype: 'json',
        colNames:['Type', 'Title', 'Eff Date', 'Expr Date', 'Href','Status', 'Rec Date', 'Notes'],
        colModel:[{name:'Type', index:'Type', width:55, sortable:true},
                  {name:'Title', index:'Title', width:90, sortable:true},
                  {name:'EffDate', index:'EffDate', width:100, sortable:true},
                  {name:'ExprDate', index:'ExprDate', width:80, align:'right'},
                  {name:'Href', index:'Href', width:80, align:'left'},
                  {name:'Status', index:'Status', width:80, sortable:true, align:'left'},
                  {name:'RecDate', index:'RecDate', width:80, align:'center'},
                  {name:'Note', index:'Note', width:150, align:'left'}],
        rowNum:10,
        rowList:[10,20,30],
        pager: '#pager',
        sortname: 'Type',
        viewrecords: true,
        sortorder: 'asc',
        caption:'Training Manager'
    }   
);
$("#training").jqGrid('navGrid','#pager',{edit:true,add:true,del:true});

And here is the data returned from server for the grid:

stdClass::__set_state(array(

'page' => 1,

'total' => 1,

'records' => 3,

'rows' =>

array (

0 =>

array (

'id' => 1,

'cell' =>

array (

0 => 1,

1 => 'Targeted Recruitment',

2 => '1/01/2010',

3 => '1/01/2050',

4 => 'http://yahoo.com',

5 => 'Active',

6 => '2/04/2010',

7 => NULL,

8 => 'Recruitment',

9 => 'Administrator',

),

),

1 =>

array (

'id' => 2,

'cell' =>

array (

0 => 2,

1 => 'Transaction Leads',

2 => '1/01/2010',

3 => '1/01/2050',

4 => 'http://google.com',

5 => 'Active',

6 => '2/04/2010',

7 => NULL,

8 => 'Transactions',

9 => 'Administrator',

),

),

2 =>

array (

'id' => 3,

'cell' =>

array (

0 => 3,

1 => 'Check Email',

2 => '1/01/2010',

3 => '1/01/2050',

4 => 'http://vqck.com',

5 => 'Active',

6 => '2/04/2010',

7 => NULL,

8 => 'IT',

9 => 'Administrator',

),

),

),

))

Thank you in advance. This is a great grid by the way.

06/02/2010
04:13
Avatar
phamtranquocviet
Member
Members
Forum Posts: 22
Member Since:
06/02/2010
sp_UserOfflineSmall Offline

I upgraded jquery to version 1.4.1, then the error goes away. However, nothing shows up inside the grid. Any idea? Thanks.

06/02/2010
06:24
Avatar
phamtranquocviet
Member
Members
Forum Posts: 22
Member Since:
06/02/2010
sp_UserOfflineSmall Offline

I got it. The data shown in the original post was the result of var_export($response) while I was debugging. I changed it to json_encode($response), and it worked like a charm. Thanks.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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