Sigma Php Ajax framework, Ajax Components, GUI Builder
May 23, 2012, 01:31:53 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: bug in tutorial (I think)  (Read 1130 times)
tartley
Newbie
*
Posts: 2


View Profile
« on: June 30, 2010, 06:56:30 AM »

Hi,

I'm doing the tutorial at:
http://sigmawidgets.com/forum/ajax-data-grid-view/sigma-grid-2-1-tutorial-1-get-started/

In the second codebox of the tutorial, about 1/4 of the way down the page, there is some javascript that reads:

var data1 = [
[serialNo:"010-0",country:"MA",employee:"Jerry",customer:"Keith",order2005:50,order2006:57,order2007:80,order2008:46,lastDate:"2008-10-02"],
[serialNo:"010-1",country:"SP",employee:"Charles",customer:"Marks",order2005:79,order2006:37,order2007:40,order2008:90,lastDate:"2008-04-24"],
[serialNo:"010-2",country:"SP",employee:"Vincent",customer:"Harrison",order2005:91,order2006:75,order2007:31,order2008:40,lastDate:"2008-02-17"],
[serialNo:"020-3",country:"RA",employee:"Edward",customer:"Sidney",order2005:61,order2006:31,order2007:80,order2008:47,lastDate:"2008-10-16"]
];

I don't know javascript, so I'm not entirely sure, but I don't think this is valid javascript. Certainly when I reach the end of the tutorial, my grid will not display unless I replace it with:

var data1 = [    {serialNo:"010-0",country:"MA",employee:"Jerry",customer:"Keith",order2005:50,order2006:57,order2007:80,order2008:46,lastDate:"2008-10-02"},    {serialNo:"010-1",country:"SP",employee:"Charles",customer:"Marks",order2005:79,order2006:37,order2007:40,order2008:90,lastDate:"2008-04-24"}, {serialNo:"010-2",country:"SP",employee:"Vincent",customer:"Harrison",order2005:91,order2006:75,order2007:31,order2008:40,lastDate:"2008-02-17"}, {serialNo:"020-3",country:"RA",employee:"Edward",customer:"Sidney",order2005:61,order2006:31,order2007:80,order2008:47,lastDate:"2008-10-16"}
];

i.e. the innermost dictionary like objects need '{}' braces, not '[]' ones.

This code appears correctly at the bottom of the tutorial, but not at the top.

Thanks,

   Jonathan
Logged
steven
Moderator
Hero Member
*****
Posts: 544



View Profile
« Reply #1 on: July 08, 2010, 01:45:37 AM »

Corrected. Thank you
Logged

Sigma AJAX Data Grid - Easy to Integrate with PHP, ASP Classic, ASP.NET & Java
Sigma PHP Ajax Framework - WYSIWYG GUI Builder With Tree, Grid, Treegrid, Dialog, Tab & More Component
Matthe55
Newbie
*
Posts: 3


View Profile
« Reply #2 on: August 20, 2010, 11:51:09 PM »

Golf Irons

Following that, most golfers expend their time functioning on their ping rapture v2 irons game coupled with their putting. Even so, with additional attention on the development of their extended coupled with middle irons, players could cut five strokes or additional by their final scores. ishiner

Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!