DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 9 of 9

Thread: HTTP Error 900

  1. #1
    Eric Stevens Guest

    HTTP Error 900



    I am receiving a .Status error of 900 while using the XMLHTTPRequest object.
    I have been unable to locate any information about this error code. Does
    anyone have any ideas?

    -Eric



  2. #2
    Russell Jones Guest

    Re: HTTP Error 900

    Are you using the XMLHTTPRequest object from the client or from the server?

    "Eric Stevens" <estevens99@hotmail.com> wrote in message
    news:3a5a4f2d$1@news.devx.com...
    >
    >
    > I am receiving a .Status error of 900 while using the XMLHTTPRequest

    object.
    > I have been unable to locate any information about this error code. Does
    > anyone have any ideas?
    >
    > -Eric
    >
    >




  3. #3
    Join Date
    Feb 2008
    Posts
    4

    I got this xmlhttprequest status 900 too. Please help

    Please can someone help? I have never seen the error 900 before until today. That stop me from getting any responsetext from the xmlhttprequest object. The error I got was from the client machine, the server is ok with status is 200

    PLEASE HELP

    Thuy
    Last edited by thuy; 02-12-2008 at 12:15 AM.

  4. #4
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,663
    Welcome to DevX

    Post the code you are using that is giving you the error.

  5. #5
    Join Date
    Feb 2008
    Posts
    4

    My code.

    thanks for your reply. Below are my code:

    showadd.jsp
    Code:
    <script language="JavaScript" type="text/javascript" src="../inc/ajax.js"></script>
    
    <script language="JavaScript">
    function getSearchResult(){
    	if(xmlHttp != null &&  xmlHttp.readyState == 4 && xmlHttp.status==200){
     		var xmlDoc = xmlHttp.responseText; 
     		setValueFromPopup ("searchResults", xmlDoc);
     	}
             else {
                   alert('status='+xmlHttp.status);
               }
    }
     	
    function userSearch(data,searchType, searchCode, cohortId, userType, sessionId) {
    	sendReq('/AddCohortMemberSearch.do?sessionId=' +sessionId+'&cohortId=' +cohortId+ '&usertype=' +
    		userType+ '&searchType=' +searchType+ '&searchKey=' +searchCode, getSearchResult); 
    }
    
    function buildRequest(dataForm) {
    	var index = -1;
     	for (i=0;i<  dataForm.as_search_type.length;i++){
    		if ( dataForm.as_search_type[i].checked )
    			index = i;
    		}
     	var searchType = dataForm.as_search_type[ index ].value;
    	userSearch(document.data, searchType, document.data.as_search_key.value, dataForm.cohortId.value, dataForm.type.value, '<%=sessionId%>' );
    }
    
    function setValueFromPopup(objId, value) {
    	var obj = document.getElementById(objId);
    	if (document.getElementById(objId) {
    		document.getElementById(objId).innerHTML = value ;
     	}
    }
    </script>
    
    <form method=post  name="data" onSubmit="return false;">
    <input type=hidden name='sessionId' value='<%=sessionId%>'>
    <input type="hidden" name='type' value='<%=type%>' >
    <input type="hidden" name="cohortId" value='<%=cohortId%>' >
    <input type=hidden name=as_action value=SEARCH>
    <table cellspacing=7>
    <tr>
    	<td><input type=radio name=as_search_type checked  value=userid>User Id</td>
    	<td><input type=radio name=as_search_type value=lastname>Last Name</td>
    	<td><input type=radio name=as_search_type value=firstname>First Name</td>
    	<td><input type=radio name=as_search_type value=email>Email</td>
    </tr>
    <tr>
    	<td colspan=3>Search: <input type=text name=as_search_key size='30' length=60></td>
    	<td ><input type=image src="/masterfile6/images/button_search.gif" alt="Search" border=0 name=as_search_button value="Search" 
    		onClick="buildRequest(document.data); return true; " ></td>
    </tr>
    </table>
    </form>
    <div id='searchResults'></div>
    ajax.js
    Code:
    function createRequestObject() {
        var ro;
        var browser = navigator.appName;
        if(browser == "Microsoft Internet Explorer" || window.ActiveXObject){
            ro = new ActiveXObject("Microsoft.XMLHTTP");
        }else{
            ro = new XMLHttpRequest();
        }
        return ro;
    }
    
    var xmlHttp = createRequestObject();
    
    function sendReq(url, handlerFunction) {
       xmlHttp.open('get', url, true);
        xmlHttp.onreadystatechange = handlerFunction;
        xmlHttp.send(null);
    }
    
    strut.xml
    
    <action path="/AddCohortMemberSearch"             type="net.bacpoint.page.controlpanel.cohortmember.AddMemberSearchAction" 
                scope="request"
                name="addCohortMemberSearchForm"
                validate="true">
                <forward name="success" path="/casjsp/controlpanel/cohortmember/searchresultsajax.jsp"/>         
                <forward name="failure" path="/jsp/ErrorPage.jsp" />
         </action>
    searchresultsajax.jsp
    Code:
    <%@ page contentType="text/html; charset=UTF-8" pageEncoding="ISO-8859-1" %>
    <%@ page language="java" %>
    
    <form action="AddCohortMember.do" name="addMemberForm">
    <table>
    <tr>
    	<th><input type=checkbox onClick='setAllUsers(addMemberForm, this.checked);' /></th>
    	<th>Name</th>
    	<th>Logon</th>
    	<th>Email address</th>
    </tr>
    <% 
    Vector users = (Vector) request.getAttribute("users");
    Iterator iterator = users.iterator();
    UserSearchElement user;
    int count = 0;
    String rowStyleClass;
    while (iterator != null && iterator.hasNext()) {
        user = (UserSearchElement) iterator.next();
        count++;
        if( count % 2 != 0 ) 
            rowStyleClass="adminTableEvenRow";
          else  
            rowStyleClass="adminTableOddRow";
    %>
    <tr class="<%=rowStyleClass %>" >
    	<td><input type="checkbox" name="memberId" value="<%= user.getUserCode() %>" ></td>
    	<td><%=user.getLastName() %>, <%= user.getFirstName() %></td>
    	<td><%=user.getUserId() %></td>
    	<td><%=user.getEmail() %></td>
    </tr>
    <% }  %>
    </table>
    <p><input type=image src="images/button_submit.gif"/></p></form>
    Here is what going on:

    the user on the showadd.jsp page click the search button to find some user and that make a call to buidrequest in showadd.jsp which call usersearch in showadd.jsp which call strut AddCohortMemberSearch in strut.xml

    Strut then returns value to searchresultsajax.jsp. searchresultsajax.jsp goes through the list to populate some html. That will return to the getSearchResult function in the showadd.jsp because of the send request to xmlhttrequest onreadystatechange. getSearchResult will check for xmlhttp status and get the responsetext to print out to the screen.

    On the server machine or over the internet (out side of the school network) it is ok. I got status=200 and the populated html is displayed. However, on any of the client machine on the network at the school, it goes into the else statement and the status=900.

    I have no idea of what could have gone wrong PLEASE HELP
    Last edited by Hack; 02-13-2008 at 08:24 AM. Reason: Added Code Tags

  6. #6
    Join Date
    Feb 2008
    Posts
    4

    Question Please can someone help, please?



    TIA
    Thuy

  7. #7
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,663
    Quote Originally Posted by thuy
    On the server machine or over the internet (out side of the school network) it is ok. I got status=200 and the populated html is displayed. However, on any of the client machine on the network at the school, it goes into the else statement and the status=900.
    Often (actually, usually) school computers are configured differantly than normal as school IT departments are very particular about what gets run on them.

    Have you taken this issue up with the school's IT department?

  8. #8
    Join Date
    Feb 2008
    Posts
    4

    what can I tell to the school IT technician?

    thanks for your reply.

    I don't think I will have any issue in discussing the configuration with the school IT technician. However I don't know what the differences are to tell him. Can you please help pointing out what they could be and how they might have affect on the situation PLEASE?

    thanks so much for helping.
    Thuy

  9. #9
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,663
    Tell them exactly what you told us. Describe the circumstances and the results, and see if they know anything that could be behind this.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center