PDA

View Full Version : Displaying a json object within a toolbar text item



adibhagra
6 Oct 2009, 3:26 AM
hey all,

i return a json object from my php file to my js file where i have my toolbar . i want to know how i can display it within the text item of my tool bar .

<---- code within php , returning json -->

<?php

echo '{count:'.json_encode($count).'}';

?>

<--- js file -->

tbar :[{
xtype:'tbtext',
text:// i want to display the count json here

}]

regards,

ice

6 Oct 2009, 5:54 AM
um... you want to display the JSON!? why?

adibhagra
6 Oct 2009, 10:24 PM
i want to display the json because it contains the number of rows queried from my database.

7 Oct 2009, 2:01 AM
set the text after the store was loaded.