SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Sep 2006
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problems with ajax

    I have do in ajax a script that call a file xml.
    But in firebug i receive this error:
    uncaught exception: [Exception... "Component returned failure code: 0xc1f30001 (NS_ERROR_NOT_INITIALIZED) [nsIXMLHttpRequest.send]" nsresult: "0xc1f30001 (NS_ERROR_NOT_INITIALIZED)" location: "JS frame :: javascript: eval(__firebugTemp__); :: anonymous :: line 1" data: no]

    And this:

    [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.status]" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: http://nerto.it/ajax.js :: anonymous :: line 69" data: no]


    At line 69 of my file there is:
    Code:
    	receiveReq.onreadystatechange = function(){
    line69:				if (receiveReq.readyState == 4&&receiveReq.status == 200) {
    					xmldoc = receiveReq.responseXML;
    					if(serviceChat)chatReceive();
    					if(serviceTop)topReceive();
    					if(serviceLast)lastReceive();
    					if(serviceCosasifa)cosasifaReceive();
    					if(serviceLocalita)localitaReceive();
    					if(serviceControlloEsistenza)esistenzaReceive();
    					return false;
    				}
    				
    			}
    			receiveReq.send(null);
    Where is the problem?
    Thanks

  2. #2
    SitePoint Enthusiast
    Join Date
    Jun 2007
    Location
    Manchester, UK
    Posts
    85
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problems with ajax

    Hi,

    Try:

    Code:
    req.send('');
    instead of

    Code:
    req.send(null);
    hope it helps

  3. #3
    SitePoint Enthusiast
    Join Date
    Sep 2006
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The error there is again...

  4. #4
    SitePoint Enthusiast
    Join Date
    Jun 2007
    Location
    Manchester, UK
    Posts
    85
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    ajax problem

    hi

    try
    Code:
    if ((req.status == 200)||(req.status == 0))
    or

    Code:
    if (req.status && req.status == 200)
    hope it works


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •