A little tip when using flexigrid with JQuery 1.4 ++

a little tip  for you who uses flexigrid with JQuery 1.4 or a higher version.

The data wont show before you change your PHP  script for generate Json into these code…


$json = '';
$json .= '{';
$json .= '"page": "'.$page.'",';
$json .= '"total": "'.$total.'",';
$json .= '"rows": [';
$rc = false;
while ($row = mysql_fetch_array($result)) {
if ($rc) $json .= ",";
$json .= '{';
$json .= '"id": "'.$row['id'].'",';
$json .= '"cell":["'.$row['id'].'","'.$row['iso'].'"';
$json .= ',"'.addslashes($row['name']).'"';
$json .= ',"'.addslashes($row['printable_name']).'"';
$json .= ',"'.addslashes($row['iso3']).'"';
$json .= ',"'.addslashes($row['numcode']).'"]';
$json .= '}';
$rc = true;
}
$json .= "]";
$json .= "}";
echo ($json);

hope this help.

I waste my time for this before finally got the solution.

Perihal puspabangun
seseorang yang senang berselancar di internet... :)

Tinggalkan Balasan

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Ubah )

Twitter picture

You are commenting using your Twitter account. Log Out / Ubah )

Facebook photo

You are commenting using your Facebook account. Log Out / Ubah )

Connecting to %s

Ikuti

Get every new post delivered to your Inbox.