Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Prototype, Ajax.Request, banał, myślę
kangur91
post
Post #1





Grupa: Zarejestrowani
Postów: 48
Pomógł: 0
Dołączył: 27.07.2008

Ostrzeżenie: (0%)
-----


Mam taki kod:
  1. function get_data_default() {
  2. new Ajax.Request('/adress',
  3. {
  4. method:'post',
  5. asynchronous:true,
  6. onSuccess: function(data){ return data.responseText.evalJSON(true); },
  7. onFailure: function(){ alert('Something went wrong...') }
  8. });
  9. }
  10. }
  11. function show(){alert(get_data_default());}


Chcę zrobić tak aby funkcja get_data_default zwracała mi "data" otrzymane z onSuccess.

Z góry dzięki za pomoc
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 11.06.2026 - 00:31