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

  • SEARCH
  • Home
  • 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 8421085
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T03:02:51+00:00 2026-06-10T03:02:51+00:00

I have created a tic-tac-toe game in php. I have created the following code

  • 0

I have created a tic-tac-toe game in php. I have created the following code to display the grid & send request to the php-

<html>
<head>
<script type="text/javascript">
function showData(str)
{
    if(str==""){
        document.getElementById("showData").innerHTML="";
    }
    if(window.XMLHttpRequest){
        //code for IE7+, Firefox, Chreom, Opera, Safari
        xmlhttp=new XMLHttpRequest();
    }
    else{
        //code for IE6, IE5
        xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
    xmlhttp.onreadystatechange=function(){
        if(xmlhttp.readyState==4 && xmlhttp.status==200){
            document.getElementById("showData").innerHTML=xmlhttp.responseText;
        }
    }
    xmlhttp.open("GET","tttoe?move="+str,true);
    xmlhttp.send();
}
</script>
</head>
<body>
<center>
<div id="showData">
<table border="1" cellpadding="1" cellspacing="1">
    <tr>
        <td>&nbsp;<input type="button" class="button1" name="move" value="1" onClick="showData(this.value)" />&nbsp;</td>
        <td>&nbsp;<input type="button" class="button1" name="move" value="2" onClick="showData(this.value)" />&nbsp;</td>
        <td>&nbsp;<input type="button" class="button1" name="move" value="3" onClick="showData(this.value)" />&nbsp;</td>
    </tr>
    <tr>
        <td>&nbsp;<input type="button" class="button1" name="move" value="4" onClick="showData(this.value)" />&nbsp;</td>
        <td>&nbsp;<input type="button" class="button1" name="move" value="5" onClick="showData(this.value)" />&nbsp;</td>
        <td>&nbsp;<input type="button" class="button1" name="move" value="6" onClick="showData(this.value)" />&nbsp;</td>
    </tr>
    <tr>
        <td>&nbsp;<input type="button" class="button1" name="move" value="7" onClick="showData(this.value)" />&nbsp;</td>
        <td>&nbsp;<input type="button" class="button1" name="move" value="8" onClick="showData(this.value)" />&nbsp;</td>

        <td>&nbsp;<input type="button" class="button1" name="move" value="9" onClick="showData(this.value)" />&nbsp;</td>
    </tr>
</table>
</div>
</center>
</body>
</html>

Is there a way so that I can show a text (Processing…..) Till the request completes?

  • 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-06-10T03:02:53+00:00Added an answer on June 10, 2026 at 3:02 am

    You can add div with id status in your html and in your js:

    document.getElementById('status').innerHTML = 'processing';
    

    at the beginning of your function and

    document.getElementById('status').innerHTML = 'whatever you want';
    

    after

    if(xmlhttp.readyState==4 && xmlhttp.status==200){
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a notepad, a Tic Tac Toe and a scientific calculator. All
I am making a Tic Tac Toe game and i created a function that
I'm making a Tic-tac-toe game and i have a board class which contains 9
I'm building a Tic Tac Toe game in Java with a Swing GUI, and
I am going to develop a Tic-Tac-Toe game using Java(or maybe other OO Languages).
As part of learning jQuery, I decided to do a simple tic-tac-toe game in
For my c++ homework assignment, I have to write a Tic-Tac-Toe Win32 console application.
I am the beginnings of writing a tic-tac-toe game. I just ran it and
I want to create a simple Tic Tac Toe game, to be played between
I have created 3 classes as following Ext.mine.TextParent - Inherting from Textfield Ext.mine.child.TextChildA -

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.