What's about to set the responseType to "text/javascript" and remove your own eval code? If you use this mimeType it will be executed directly.

Sebastian



Jim Hunter schrieb:
I am trying to replace the current transport system I have with the QxRequest system but getting some odd results. I am getting the proper text back (it is a bunch of JavaScript code), I know this because I can show it in an alert, but it will not eval(). This same text evals just fine when returned via my other XMLHttpRequest system. Is there something I am missing when dealing with JavaScript through a QxRequest? Here is the code I am running:

  this.refresh = function()
  {
//s = loadDoc('getDispatchTabBody.htt?target=' + toolID); // this method works fine if I use it var r = new QxRequest('getDispatchTabBody.htt?target=' + toolID, "GET", "text/plain");
    with (r)
    {
//setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); // tried with and without the header, no difference
       setAsynchronous(false); // tried with and without this
       addEventListener("completed", function(e)
       {
         var s = e.getData().getContent();
s = s.toString(); // tried it straight and with toString(), no difference
         alert(s); // this is the correct returned text, looks fine
eval(s); // there is an alert in the returned JavaScript that never executes
         alert('2');  // this never gets executed
       });
    }
    r.send();
    //alert(s);  // this was used when testing LoadDoc()
    //eval(s);  // same as above.
  }


Thanks,
Jim



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Qooxdoo-devel mailing list
Qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to