hi!
What is returning this ?
$this->getResponse()->setHttpHeader("X-JSON", '('.$output.')');
i might think your JSON response is bad.
and also js variable "REQUEST" is not defined in
<?php echo jq_link_to_remote('Refresh the letter', array(
'url' => 'test/test',
'dataType' => 'json',
'complete' => 'updateJSON(request, json)'
)) ?>
I do not know the issues but it might help you out to "
alert(typeof(request)) " inside the js code
On Mon, Apr 20, 2009 at 5:32 PM, Guychmyrat Amanmyradov <
[email protected]> wrote:
> Hello. i am tring to use jquery + json but there is a problem :
>
> <?php echo jq_link_to_remote('Refresh the letter', array(
> 'url' => 'test/test',
> 'dataType' => 'json',
> 'complete' => 'updateJSON(request, json)'
> )) ?>
>
>
> i got
>
> request is not defined
> onclick()()
>
> error.
>
> my test function is :
>
> public function executeTest()
> {
> $output = '[["title", "My basic letter"], ["name", "Mr Brown"]]';
> $this->getResponse()->setHttpHeader("X-JSON", '('.$output.')');
> return sfView::HEADER_ONLY;
> }
>
> js function is :
>
> function updateJSON(request, json)
> {
>
> alert(json.length);
>
> }
>
>
> what is the problem.. ?
>
>
>
> ------------------------------
> Yahoo! Türkiye açıldı!
> Haber, Ekonomi, Videolar, Oyunlar hepsi Yahoo! Türkiye'de!
> www.yahoo.com.tr <http://tr.yahoo.com/>>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---