Well, this morning the same web page works. Looks as if the jsbin.com
editor app is messing things up, as it doesn't work properly when
displayed in the editor.

So that's a red herring, then, and I am no nearer finding out why
getScript sometimes doesn't return at all in my real app :-(

Sorry for wasting bandwidth.

On 25 June, 20:57, Nikki Locke <ni...@trumphurst.com> wrote:
> I am building a web app that is controlled from a server. I want the
> server to send objects to the app, which the app then processes. I am
> using getScript for this, but it doesn't seem to be working for me.
> I have example code at //jsbin.com/umuwi
>
> This code calls getScript on the url ://jsbin.com/utake - this returns
> the following text:
> _jq_action={type:"href"};
>
> I call getScript as follows:
>
> var _jq_action;
>
> $(document).ready(function(){
>     _jq_getaction();
>
> });
>
> function _jq_getaction() {
>     try {
>         _jq_action = null;
>         $.getScript("http://jsbin.com/utake";, _jq_processaction);
>         _jq_log("sent request");
>     } catch(e) {
>         alert(e);
>     }
>
> }
>
> function _jq_processaction() {
>     try {
>         _jq_log("got reply");
>         if(_jq_action) {
>             _jq_log(_jq_action.type + " received");
>         } else {
>             _jq_log("no action");
>         }
>     } catch(e) {
>         alert(e);
>     }
>
> }
>
> _jq_log is a function which merely outputs messages to the screen, so
> I can see what is going on.
>
> The request gets sent, but _jq_action is always null.
>
> NikkiLocke

Reply via email to