Thanks for the suggestion Scott.

I've tried to add the current timestamp (via the javascript expression
"new Date().getTime()" ) to the parameters and the query string (in
all the combinations such as first adding it only to parameters, then
only to query string, and then to both) and unfortunately, still no
luck.

I did verify that in IE, the timestamp was being received by the
servlet.

One thing I did catch, however, is that the first time I tried it in
firefox, firebug reported this exception:
Component returned failure code: 0x80004005 (NS_ERROR_FAILURE)
[nsIXMLHttpRequest.send

This was thrown by the line
this.transport.send()
of prototype.js, but subsequent times, firefox did not produce this
exception anymore (the ajax request did not raise any exceptions, yet
still no luck in reaching the servlet)

I looked this error code up on google and also tried looking it up on
Mozilla's Source Code site (http://mxr.mozilla.org/mozilla1.8.0/source/
extensions/xmlextras/base/src/nsXMLHttpRequest.cpp#1423) and it looks
like this NS_ERROR_FAILURE error is returned by the send() method in
three places:
Line 1429 (this is the case where more than one request is made with
the same XMLHttpRequest object)
Line 1553 (not quite sure how this one works)
Line 1626 (right before firefox returns a successful response, it
check whether mChannel exists, and if not, it returns this error).. my
guess would be that this is the line that's causing my request not to
work, but I can't figure out why.

--Ronen

On Mar 15, 10:15 am, Scott <counterstre...@gmail.com> wrote:
> I have had similar issues before in my applications. I have always
> assumes that they were caching issues. With the method as 'post' and
> adding the current date and time in the parameters field (or query
> string), I've been able to get past this issue.
> This is to make sure the url being called is alway unique. You may
> want to parse out punctuation characters though.
>
> I would be interested to know if this is some sort of application
> scope issue like T.J. Crowder is suggesting. It seems unlikely due to
> the fact that IE is allowing it. Although I have seen IE do some
> pretty weird stuff I wouldn't ignore the possibility.
>
> On Mar 12, 6:53 am, Ronen <rrotst...@gmail.com> wrote:
>
> > I've downloaded the latest prototype (version 1.6.1) and tried to call
> > a java servlet using Ajax.Request.  From IE, it works just fine
> > (probably because it's using ActiveX rather than XMLHttpRequest), but
> > I'm having no luck with Firefox (v3.6) and Chrome (4.0).
>
> > The servlet that I'm calling performs a log operation right away so I
> > can see whether it was called or not.  That's how I know that IE is
> > successful but firefox and chrome aren't.
>
> > I've used Firebug to try to debug firefox and I see that the line
> > this.transport.send(this.body);
> > is, in fact, being called by firefox.  But still, my servlet shows no
> > log of being called.
>
> > The exact javascript I'm using is below:
> >      var opts = {
> >           method: 'post',
> >           parameters : { key:"value" },
> >           onSuccess: function(transport)
> >           {
> >                var d = new Date();
> >                document.getElementById("location").value =
> > d.getTime();
> >           }
> >      }
> >      var asyncReq = new Ajax.Request("http://localhost:8701/MyApp/
> > MyServlet", opts);
>
> > As you can see, in the success method, I just populate a textbox to
> > have the current date/time, and this actually works in all browsers
> > (IE, Firefox, Chrome).  Just that in Firefox and Chrome the servlet is
> > not physically being called (yet the success method is).
>
> > Any help in solving this issue is greatly appreciated.
>
> > --Ronen

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to