Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7626963
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T05:23:47+00:00 2026-05-31T05:23:47+00:00

I am trying to model a chat application on a browser(Firefox).Here I am trying

  • 0

I am trying to model a chat application on a browser(Firefox).Here I am trying to send the char inserted into a text area on one machine to another client and update its text area.
I am trying to send the key pressed on the client using AJAX calls. Below is the function call that I have written :

function returnKeyFromCode(code)
{
 //Returns char code
};


function keyPress(e)
{

    var textReplace = document.getElementById("textReplace");
    var keyPressed = returnKeyFromCode(e.which)  ;
    textReplace.innerHTML = keyPressed;
    var locationReplace = document.getElementById("location");
    locationReplace.innerHTML = mainDoc.selectionStart;

    xmlhttp=new XMLHttpRequest();
    xmlhttp.onreadystatechange=function(){};
    xmlhttp.open("POST","http://localhost:5000?key=" + keyPressed + "&pos=" +mainDoc.selectionStart +"&revno=1&param=EOS",true);
    xmlhttp.send("Stuff");
};

At the client side, when the char is received the following error is displayed on the fire bug console:
‘0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.status]’ .

Before sending the data, a persistent connection is being set up between client ans server using another Ajax call.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T05:23:48+00:00Added an answer on May 31, 2026 at 5:23 am

    It looks like you’ve edited some of your code before posting this question, so I can only speculate, but based on the error, i’d guess at some point you’re sending null to this function: xmlhttp.send("Stuff");

    Try doing a null check on the data before you send it, or possibly make sure whatever starts the send process is in a document ready, so that you’re not trying to grab data from an undefined text element.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to model some highly connected, but also hierarchical data in app engine. Here
Im trying to write a chat app with the push-model but up to now
I'm trying to model vehicles at a basic level. Here's how I see the
I'm trying to model a composite object that consists of one or more shapes.
I am trying to model a scheduling application for my company and could use
I have been trying the model-first method when designing my application. We usually like
I'm trying to pass model attributes to javascript through html like this: <script type=text/javascript>
Trying to understand the Android framework model. I have an application that needs to
I'm trying to model my tests after the great work that the Thougtbot guys
I'm trying to model bind a set of dynamically generated checkboxes so as to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.