CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Threaded View

  1. #1
    Join Date
    Apr 2010
    Posts
    1

    Smile ajax uncaught exception: send(null)

    hii
    i am trying to get response from domain https://www.dex-intl.com/data_access...ch_box_dal.php through ajax call, but getting following exception

    uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIXMLHttpRequest.send]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://localhost/projects/mtdb/Ajaxcall.php :: loadajex :: line 39" data: no]

    Code:
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Testing Ajex</title>
    <script type="text/javascript">
    function getHTTPObject()
    {
    var xhr = false;
    if (window.XMLHttpRequest)
    	{
    		xhr = new XMLHttpRequest();
    	}
    		else if (window.ActiveXObject) {
    		try
    			{
    				xhr = new ActiveXObject("Msxml2.XMLHTTP");
    			}
    		catch(e)
    			{
    				try
    					{
    						xhr = new ActiveXObject("Microsoft.XMLHTTP");
    					}
    				catch(e)
    					{
    						xhr = false;
    					}
    			}
    }
    return xhr;
    }
    var request;
    
    function loadajex(){	   		
        var request = getHTTPObject();
        request.open("GET",'https://www.dex-intl.com/data_access_layer/search_box_dal.php?msgno=333333',false);
    	request.send(null);
        if(request.status==200){
            alert(request.responseText);
       }
    } 
    </script>
    </head>
    
    <body>
    <div>Call to <a href="" onclick="loadajex()">Dex-intel.com</a></div>
    <div id="response"></div>
    </body>
    </html>
    Last edited by PeejAvery; April 12th, 2010 at 07:22 PM. Reason: Added code tags.

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured