in decoding the data got from a query in a php file using JSON,

new Request(  {method: 'post',
                       url: DOMAIN_URL + 'sample.php?v=' + new
Date().getTime(),
                       onSuccess: function(response){
                                                var jsonarray =
JSON.decode(stripslashes(response));

using that line, I tried to place all decoded data in an array.
decoding and placing them in the array is successful,  i tested it by
alert(), but after doing that or after that line, the array contains
nothing at all. did i declared the array wrong?

sample is

function gecode(){
    temp = array();
    queryString = what i was looking for;
    new Request(  {method: 'post',
                       url: DOMAIN_URL + 'sample.php?v=' + new
Date().getTime(),
                       onSuccess: function(response){





}



I tried placing all the data in an array

On Mar 13, 11:12 pm, Andrew Leach <[email protected]>
wrote:
> On Mar 13, 3:00 pm, Telehealth Telehealth <[email protected]>
> wrote:
>
> > Thank you very much for giving that link to me, it took me an hour of
> > searching for the answer to my problem after posting this question
> > yesterday, and I found out that geocoder really is asynchronous. After
> > that I tried searching of a possible way or similar to alert(); in
> > javascript in order to pause all processing of codes, can you give me
> > any idea on how can i do that is similar to alert();? using a
> > synchronous like alert but doesnt need to be clicked by someone, let
> > say similar to setTimeout();
>
> With asynchronous functions you need to put everything you want to do
> with the data into the callback function. There isn't another way of
> doing it, as the data is only reliably available to the callback
> procedure.
>
> Google mangled the link I gave (in the web view of the 
> Group):http://www.easypagez.com/hosting.html

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API" 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/google-maps-api?hl=en.

Reply via email to