Hi!

Thx for your reply.

I created a *.json.php but it is never read. I also tried to remove
the *.php which will result in an error.

Here is my complete action without business logic:
public function executeShowAjax(sfWebRequest $request) {
    $this->setLayout(false);
    $statisticData = array("1196463600000" => "0", "1196550000000" =>
"0");
    $statisticData = json_encode($statisticData);
    $this->data = $statisticData;
}

Thx again

On 6 Mrz., 20:52, RG <reg...@gmail.com> wrote:
> What is the name of your temlpate ? It should be
> xxxxxSuccess.json.php. symfony will automatically set the right
> content type. See factories.yml in symfony/lib/config/config  ( json:
> [application/json, application/x-json] )
> On Mar 6, 7:33 pm, ScherlOMatic <stefan.scherbich...@gmail.com> wrote:
>
> > Hello!
>
> > I tried to include the flot javascript (http://code.google.com/p/
> > flot/) library to get a nice look and fell for my statistics.
>
> > The only problem is that i can't send my data values to my javascript
> > function.
>
> > Action:
> > $statisticData = array("1196463600000" => "10", "1196550000000" =>
> > "20");
> > $statisticData = json_encode($statisticData);
> > $this->data = $statisticData;
>
> > Template:
> > <?php echo $data ?>
>
> > JS:
> > $.ajax({
> >       url:'/customer.php/dashboard/statisticAjax',
> >       type:'GET',
> >       dataType:'json',
> >       success: onDataReceived,
> > ....
>
> > function onDataReceived(data) {
> >   $.plot( $("#placeholder"), [data]);
>
> > }
>
> > So the main problem is how to send and receive the data in a correct
> > format.
>
> > Thx

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to