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