BTW, it is working. Here is the output of http://jsbin.com/umuwi :
Hello from JS Bin www.trumphurst.com ready sent request got reply href received On Jun 26, 1:45 pm, Nikki Locke <ni...@trumphurst.com> wrote: > Further to this, my real application is hanging the browser, and I > don't know how to find out what is wrong :-( > > I have tried it with IE8, Firefox, Safari and Chrome - the browser > always hangs at some point. > > Any suggestions what to try next would be very gratefully received. > > 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. > > > Nikki Locke