Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Ajax Error

 
Mary Cole
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All,

In the retrieveURL method am alerting some values for my reference



In IE I always get the readystate as 0 and doesn't alert me the status and throws up a JS error..."Unspecified Error"

In Firefox, it runs in a loop and the readystate is 0 and the status is also 0 and throws an error on teh JS console








I tested this function from an href as well as from a button click and the effect is same
Pls advice...its urgent

Thx
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can not call req.status until it reaches complete (4).

Eric
 
Mary Cole
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thx for your response...so how should my modified code look like
 
Mary Cole
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anybody there to help me out?
 
Eric Pascarello
author
Rancher
Posts: 15385
6
 
Bibhash Roy
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Solution Required for Problem in "Ajax in Struts-based Web Application"
=======================================================================
In the Web-app, there is table to which multiple rows can be added ..the
rows are filled by ajax calls...rows may be deleted as well in which case the deletion is done from client-side javascript call and then refreshing the undeleted rows using the same ajax call...

Now things work fine till the number of rows are limited to five(in
mozilla-based browsers) and 3(in IE).....However if the no. of rows exceeds the aforementioned, then ajax-call ("send" part) fails to dispatch the request and the Javascript console displays the following error:

Error: [Exception... "Component returned failure code: 0x80040111
(NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.status]" nsresult: "0x80040111
(NS_ERROR_NOT_AVAILABLE)" location: "JS frame ::
http://localhost:8080/catissuecore/Distribution.do?operation=add&pageOf=pageOfDistribution&menuSelected=16
:: processRequestOnSpecimenIdChange :: line 370" data: no]
Source File:
...............
Line: 370

Now line 370 is:
if (req.status == 200) {

...Any pointers ??
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic