Okay, i guess i will make the results var global and access it from the callback.<br><br>Is there a freebase api to get the name of the article in wikipedia?<br>so if I have the id as &quot;/en/taj_mahal&quot; and the guid as &quot;#9202a8c04000641f800000000009216a&quot;, name as &quot;Taj Mahal&quot;<br>
I guess there must be a way to find out the wikipedia article name which is <a href="http://en.wikipedia.org/wiki/Taj_mahal">http://en.wikipedia.org/wiki/Taj_mahal</a><br><br><div><span class="gmail_quote">On 5/15/08, <b class="gmail_sendername">Dae Park</b> &lt;<a href="mailto:daepark@metaweb.com">daepark@metaweb.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="margin-top: 0; margin-right: 0; margin-bottom: 0; margin-left: 0; margin-left: 0.80ex; border-left-color: #cccccc; border-left-width: 1px; border-left-style: solid; padding-left: 1ex">
I am unaware of any methods invoking something cross domain<br> synchronously. Even if it&#39;s possible, I doubt you want the browser to<br> be &quot;blocked&quot; while you are waiting for your response.<br><br><br> -dae<br>
<br><br><br> On May 14, 2008, at 8:25 AM, Zodiac Seven wrote:<br><br> &gt; Dae,<br> &gt;<br> &gt; $.ajax is using a async callback too. Isn&#39;t there an approach which<br> &gt; will<br> &gt; work synchronously like XmlHttpRequest?<br>
 &gt;<br> &gt; On 5/14/08, Dae Park &lt;<a href="mailto:daepark@metaweb.com">daepark@metaweb.com</a>&gt; wrote:<br> &gt;&gt;<br> &gt;&gt; You should be able to $.ajax with &quot;jsonp&quot; as the dataType to<br> &gt;&gt; accomplish what you want.<br>
 &gt;&gt;<br> &gt;&gt; -dae<br> &gt;&gt;<br> &gt;&gt;<br> &gt;&gt;<br> &gt;&gt; On May 13, 2008, at 11:09 AM, Zodiac Seven wrote:<br> &gt;&gt;<br> &gt;&gt;&gt; This is more of a javascript question then a freebase one but<br>
 &gt;&gt;&gt; hoping someone here can help.<br> &gt;&gt;&gt;<br> &gt;&gt;&gt; I am trying to make a call to a webservice in freebase suggest<br> &gt;&gt;&gt; (<a href="http://code.google.com/p/freebase-suggest/">http://code.google.com/p/freebase-suggest/</a>)<br>
 &gt;&gt;&gt; This means I call a web service for every suggestion and depending<br> &gt;&gt;&gt; on that i display the suggestion.<br> &gt;&gt;&gt;<br> &gt;&gt;&gt; freebase.suggest.js Line 528.<br> &gt;&gt;&gt;<br> &gt;&gt;&gt; p.list_receive = function(input, txt, o) {//fb.log(&quot;list_receive&quot;,<br>
 &gt;&gt;&gt; input, query, o);<br> &gt;&gt;&gt; // handle errors<br> &gt;&gt;&gt; if (o.status !== &#39;200 OK&#39;) {<br> &gt;&gt;&gt; fb.error(&quot;list_receive&quot;, o.code, o.messages, o);<br> &gt;&gt;&gt; return;<br>
 &gt;&gt;&gt; }<br> &gt;&gt;&gt; ...<br> &gt;&gt;&gt; var url = &#39;<a href="http://somesite/webservice">http://somesite/webservice</a>?<br> &gt;&gt;&gt; callback=mycheckfunction&amp;term=&#39; + suggestKeyWord;<br> &gt;&gt;&gt;<br>
 &gt;&gt;&gt; // Create a script tag, set its src attribute and add it to the<br> &gt;&gt;&gt; document<br> &gt;&gt;&gt; // This triggers the HTTP request and submits the query<br> &gt;&gt;&gt; var script = document.createElement(&quot;script&quot;);<br>
 &gt;&gt;&gt; script.src = url;<br> &gt;&gt;&gt; document.body.appendChild(script);<br> &gt;&gt;&gt; ...<br> &gt;&gt;&gt; // further logic to add/remove the item<br> &gt;&gt;&gt;<br> &gt;&gt;&gt; My problem is that i&#39;m using document.createElement(&quot;script&quot; and<br>
 &gt;&gt;&gt; since that is async i have no idea of knowing the response of my<br> &gt;&gt;&gt; web service.<br> &gt;&gt;&gt; I could move the further logic into the callback but is there a<br> &gt;&gt;&gt; &#39;synchronous&#39; way to wait until i get a response from my web<br>
 &gt;&gt;&gt; service.<br> &gt;&gt;&gt; I can&#39;t use xmlHttpRequest because of the cross domain restriction.<br> &gt;&gt;&gt;<br> &gt;&gt;<br> &gt;&gt;&gt; _______________________________________________<br> &gt;&gt;&gt; Developers mailing list<br>
 &gt;&gt;&gt; <a href="mailto:Developers@freebase.com">Developers@freebase.com</a><br> &gt;&gt;&gt; <a href="http://lists.freebase.com/mailman/listinfo/developers">http://lists.freebase.com/mailman/listinfo/developers</a><br>
 &gt;&gt;<br> &gt;&gt; _______________________________________________<br> &gt;&gt; Developers mailing list<br> &gt;&gt; <a href="mailto:Developers@freebase.com">Developers@freebase.com</a><br> &gt;&gt; <a href="http://lists.freebase.com/mailman/listinfo/developers">http://lists.freebase.com/mailman/listinfo/developers</a><br>
 &gt;&gt;<br> &gt; _______________________________________________<br> &gt; Developers mailing list<br> &gt; <a href="mailto:Developers@freebase.com">Developers@freebase.com</a><br> &gt; <a href="http://lists.freebase.com/mailman/listinfo/developers">http://lists.freebase.com/mailman/listinfo/developers</a><br>
<br> _______________________________________________<br> Developers mailing list<br> <a href="mailto:Developers@freebase.com">Developers@freebase.com</a><br> <a href="http://lists.freebase.com/mailman/listinfo/developers">http://lists.freebase.com/mailman/listinfo/developers</a><br>
</blockquote></div><br>