This is symfony offtopic.

Check your resulting code:
"complete:function(XMLHttpRequest, textStatus){updateJSON(request,  
json);"
That does totally makes no sense.
Try something like
> echo jq_link_to_remote('Refresh the letter', array(
>       'url'      => 'friend/test',
>      'dataType' => 'json',
>     'failure' => "alert('HTTP Error ' + request.status + '!')",
>      'complete' => "function(request, textStatus){ json=request.foo;  
> updateJSON(request, json) }'

json=request.foo; <-- Here you have to extract the json response from  
the request.

- Frank



Am 02.06.2009 um 10:57 schrieb Guychmyrat Amanmyradov:

> hi,
> i am tring to fetch data using jquery + json.
>
> here is m code :
>
> echo jq_link_to_remote('Refresh the letter', array(
>       'url'      => 'friend/test',
>      'dataType' => 'json',
>     'failure' => "alert('HTTP Error ' + request.status + '!')",
>      'complete' => updateJSON(request, json); '
> ))
>
> but i got "request is not defined" error. and json is not defined  
> errors.
>
> then i try 'complete' => 'alert(XMLHttpRequest.responseText)'
>
> it alerts
> [["title", "My basic letter"], ["name", "Mr Brown"]]
>
> why every time i got request is not defined. or json is not defined.
>
> HTML output is like this :
>
>
> <a
>   
> onclick 
> = 
> "jQuery 
> .ajax({type:'POST',dataType:'json',complete:function(XMLHttpRequest,  
> textStatus){updateJSON(request, json); },url:'/test/test'}); return  
> false;" href="#">Refresh the letter</a>
>
>
> i do not use prototype. i use just jquery.
>
> js files :
>
>
> <script type="text/javascript" src="/js/jq/jquery.js"></script>
> <script type="text/javascript" src="/sf/sf_web_debug/js/main.js"></ 
> script>
> <script type="text/javascript" src="/js/tabs/jquery-1.js"></script>
> <script type="text/javascript" src="/js/tabs/ui_002.js"></script>
> <script type="text/javascript" src="/js/tabs/ui.js"></script>
> <script type="text/javascript" src="/js/jquery.selectbox-0.5.js"></ 
> script>
> <script type="text/javascript" src="/js/builder.js"></script>
> <script type="text/javascript" src="/js/facebox.js"></script>
> <script type="text/javascript" src="/js/thickbox.js"></script>
> <script type="text/javascript" src="/js/editinplace/ 
> jquery.editinplace.packed.js"></script>
> <script type="text/javascript" src="/js/editinplace/demo.js"></script>
> <script type="text/javascript" src="/js/facebook/ 
> jquery.autocomplete.js"></script>
> <script type="text/javascript" src="/js/facebook/ 
> jquery.facelist.js"></script>
>
> is it a bug or ?
>
>
> Yahoo! Türkiye açıldı!
> Haber, Ekonomi, Videolar, Oyunlar hepsi Yahoo! Türkiye'de!
> www.yahoo.com.tr
> >


--~--~---------~--~----~------------~-------~--~----~
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