Hopefully not wading in half cocked here but...<br><br>AFAIK non of the major web browsers implement threading for their javascript engines, or at least not within a single window. Hence when your asynchronous call returns it does not get executed until the current javascript thread terminates. Obviously this is unacceptable on the desktop but in terms of web apps it seems the right thing to do. That said javascript should only be used to enable the interface - we shouldn&#39;t be using it for any long execution stuff.
<br><br>-Pete<br><br><div><span class="gmail_quote">On 17/04/07, <b class="gmail_sendername">Tim Newsom</b> &lt;<a href="mailto:cephdon@gmail.com">cephdon@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>On Tue, 17 Apr 2007 3:54, Alexander E Genaud wrote:<br>&gt; Tim,<br>&gt;<br>&gt; I believe Microsoft created the non-standard XMLHttpRequest object<br>&gt; through Active X around IE 5 but it has become something of a standard
<br>&gt; implemented by Firefox, Safari/Konquerer, Opera, and perhaps others.<br>&gt; I&#39;ve been using a nice wrapper, Sarissa, successfully for a few years<br>&gt; in many environments.<br>&gt;<br>&gt; <a href="http://dev.abiss.gr/sarissa/">
http://dev.abiss.gr/sarissa/</a><br>&gt;<br>&gt; I believe the asynchronous flag is implemented in those major<br>&gt; browsers. Alternatively, you can create an HttpConnection &quot;class&quot; with<br>&gt; it&#39;s own timeout, abort, polling (4K), threading, etc. While the
<br>&gt; details are different across browsers, it seems that threads never<br>&gt; context switches unless explicitly asked to do so (such as Timeouts<br>&gt; and alert dialogs). In other words, a &quot;ring&quot; might come in, but if you
<br>&gt; are calculating the Fibonacci numbers to the umpteenth power, the<br>&gt; &quot;ring&quot; thread probably won&#39;t alert you in good time. I believe that is<br>&gt; true regardless of the async flag.<br>&gt;<br>
&gt; Alex<br><br>Alex,<br><br>Hmm, that&#39;s interesting... It seems like a poor implementation if you<br>can&#39;t guarantee that the event will fire asynchronously.&nbsp;&nbsp;Why offer it<br>at all?&nbsp;&nbsp;Strange.<br><br>--Tim<br><br>
_______________________________________________<br>OpenMoko community mailing list<br><a href="mailto:community@lists.openmoko.org">community@lists.openmoko.org</a><br><a href="http://lists.openmoko.org/mailman/listinfo/community">
http://lists.openmoko.org/mailman/listinfo/community</a><br></blockquote></div><br>