Hey, bratliff, probably somebody has to translate, what you are trying 
to tell me... Would source code be of help? A Wireshark trace??

>Returning a JS file immediately without waiting for your server to
>produce results is not the way most people use JSON with a callback.
>The JS file should contain the results of the query.  Otherwise, what
>purpose does it serve ?

??!?! Who is returning what JS file while not waiting for results Hello!?!?! 
Anybody home???!? :)

What the hell do you mean by that? I'm frustrated, why nobody seems to 
understand.. OK, your language is not my native one, but do I speak _that_ 
nonsense?

Basically: After the injection of the script as mentioned in all of my posts, 
the injected script tag looks like this in the HTML presented to the browser 
(proven by IEWatch):

<SCRIPT id=_json_ src="query.aspx?callback=processData&amp;timestamp=Sun Oct 26 
00:14:38 2008" type=text/javascript>

This results in an immediate HTTP GET to the server, which handles the query 
and returns this JSONP (short version) (proven by Wireshark and IEWatch)

processData([{"lat":52.50121,"lon":13.31611,"image":"img/wlan.png","shadow":"img/wlan_shadow.png","locationname":"Hotel
 Askanischer 
Hof","zip":"10707","city":"Berlin","street":"Kurfürstendamm","house":"53"},{"lat":52.49779,"lon":13.32383,"image":"img/wlan.png","shadow":"img/wlan_shadow.png","locationname":"Hotelpension
 Bella","zip":"10719","city":"Berlin","street":"Ludwigkirchstr.","house":"10 
A"},{"lat":52.50792,"lon":13.24372,"image":"img/wlan.png","shadow":"img/wlan_shadow.png","locationname":"Michels
 Apart 
Hotel","zip":"14055","city":"Berlin","street":"Heerstr.","house":"80"}...........,])

In worst case (no results) it returns 

processData([]);

This happens of course asynchronously to the browsers activities. What I say 
now, is: Regardless, of what the result of the server operation is, regardless, 
of whether the server returns 200, 404 or 500 or 4711, regardless, of whether 
the server needs milliseconds or hours to answer: In either case the __json__ 
element fires onreadystatechange "loading" / "loaded" in a raw very fast and 
without any feedback and relation, to what happens on the server. It might be 
different, if a simple JS file is loaded.. Is this, what you are talking 
about?! 

If I change the URL to "_entry_.aspx" or so, the result is an error 
message of the  server (HTTP 404) and the JSONP (the "callback") is 
never called, the map is not filled with markers. In this case - as 
mentioned - the onreadystatechange "loading"/"loaded" fires as usual. 
BTW: The same happens with "onload" in Firefox..

So, I cannot find any reason to use this events at all. And again: 
onreadystatechange/onload just tells you, that the browser has 
recognized and handled your _script_tag_ . It does not give you any 
information, of whether the action referred to in "src" has been done 
successfully or erroneously...

Got it?

I go to bed :(
 


bratliff schrieb:
> On Oct 25, 9:47 pm, "Neil.Young" <[EMAIL PROTECTED]> wrote:
>   
>> I still have to renew my claim: onreadystate just reflects the state of
>> the loading/execution of the script tag in the browser and does nothing
>> say about the progress or even the results of a server side execution.
>>     
>
> Returning a JS file immediately without waiting for your server to
> produce results is not the way most people use JSON with a callback.
> The JS file should contain the results of the query.  Otherwise, what
> purpose does it serve ?
>
>   
>> "Non existent JS files" - there is no such a thing in my scenario. There
>> is an ASPX file and a web app behind on a server, the server responds in
>> any case (except she's dead).
>>     
>
> A bad URL will never call your JSON callback but it will call your
> event handler.
>
> >
>   

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