Here is the low down on what I have learned. If the QxRequest is set to 'text/html' then s contains the correct information but does not get executed. If I change the type to 'text/_javascript_' then s = "undefined". The response type in both cases was set to 'text/_javascript_', no change on the server side. So given that, what can I do to remedy the situation? Do I have to encase the response text inside <SCRIPT></SCRIPT> tags? What format is it looking for? The only text in the response was:

alert("hello");

nothing more nothing less.

What now?

Thanks,
Jim

BTW- my wife was wondering where you lived as she lived in Ramstein for over a year.



On 4/20/06, Sebastian Werner <[EMAIL PROTECTED]> wrote:
Looks good for me. Have you any output in the debug console or inside
the _javascript_ console? The variable "s" defined in your completed event
handler has the correct content?

Sebastian


Jim Hunter schrieb:
> I changed the content-type for this response to 'text/_javascript_' as you
> suggested and the alert confirms that it is of this type, but it does
> not execute the code. I sent back a simple alert("hello") from the
> server but it did not get executed. Here is the simple function I am
> using, what needs to be changed to make this work?
>
> Thanks,
> Jim
>
>     var r = new QxRequest('updateDispatch.htt ?target=' + toolID, "GET",
> "text/_javascript_");
>     with (r)
>     {
>        setAsynchronous(false);
>        addEventListener("completed", function(e)
>        {
>            alert(e.getData().getResponseHeader("Content-Type"));
>            var s = e.getData().getContent(); // legacy code, should not
> effect anything or does it?
>        });
>     }
>     r.send();
>
>
>
> On 4/19/06, *Jim Hunter* <[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED] >> wrote:
>
>     Would I have been able to find this information anywhere except in
>     the source code? I want to use you as a last resort, I would rather
>     find the information myself.
>
>     Thanks for the answer!
>
>     Jim
>
>
>     On 4/19/06, *Sebastian Werner* <[EMAIL PROTECTED]
>     <mailto: [EMAIL PROTECTED]>> wrote:
>
>         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
>         <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642>
>         _______________________________________________
>         Qooxdoo-devel mailing list
>         Qooxdoo-devel@lists.sourceforge.net
>         <mailto: Qooxdoo-devel@lists.sourceforge.net>
>         https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
>



-------------------------------------------------------
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