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 4273208
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T07:40:54+00:00 2026-05-21T07:40:54+00:00

The cat that is on this web page is suppose to move when you

  • 0

The cat that is on this web page is suppose to move when you click it to move and stop moving when you click it. For some reason mine is not doing it. I do not receive any errors either. Can someone point me in the direction of what I am doing wrong?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Fat Cat Dancing</title>
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<script type= "text/javscript">
<![CDATA[
  var cats = new Array(3);
  var fatCat = 0; 
  var direction; 
  var begin; 
  cats[0] = "fatcat0.gif"; 
  cats[1] = "fatcat1.gif"; 
  cats[2] = "fatcat2.gif";

  function dance() { 
    if (fatCat == 0)     
      direction = "right"; 
    else if (fatCat == 2)          
      direction = "left"
    if (direction == "right")     
      ++fatCat;     
    else if (direction == "left")         
      --fatCat;     
    document.animation.src = cats[fatCat];     
  } 
  function startDancing() {     
    if (begin)         
      clearInterval(begin);     
    begin = setInterval("dance()",200); 
  }
]]>
</script>
</head>
<body>
<h1>Fat Cat Dancing</h1> 
<p><img src="fatcat1.gif" name="animation" alt="animation" id="animation" /></p> 
  <form action=""> 
    <input type="button" name="run" value="Start Dancing" onClick="startDancing();" />
    <input type="button" name="stop" value="Stop Dancing" onClick="clearInterval(begin);" />
  </form>
</body>
</html> 
  • 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-21T07:40:55+00:00Added an answer on May 21, 2026 at 7:40 am
     <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
     <title>Fat Cat Dancing</title>
     <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
     <script type= "text/javascript">
      <![CDATA[
      var cats = new Array(3);
      var fatCat = 0; 
      var direction; 
      var begin; 
      cats[0] = "fatcat0.gif"; 
      cats[1] = "fatcat1.gif"; 
      cats[2] = "fatcat2.gif";
      function dance() { 
        if (fatCat == 0)     
            direction = "right"; 
       else if (fatCat == 2)          
            direction = "left";
      if (direction == "right")     
            ++fatCat;     
        else if (direction == "left")         
            --fatCat;     
            document.animation.src = cats[fatCat];     
     } 
     function startDancing() {     
      if (begin)         
        clearInterval(begin);     
        begin = setInterval("dance();",200); 
       }
      ]]>
     </script>
     </head>
    
     <body>
    
    
    <h1>Fat Cat Dancing</h1> 
    <p><img src="fatcat1.gif" name="animation" alt="animation" id="animation"/></p> 
    <form action= ""> 
    <input type="button" name="run" value="Start Dancing" onClick="startDancing();"/>
    <input type="button" name="stop" value="Stop Dancing "   onClick="clearInterval(begin);"/>
    

    You forgot to delimit a few lines.

    EDIT: Good eye, Zecc! You also spelled “javascript” wrong in your <script> tag.

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

Sidebar

Related Questions

In this xkcd comic : they mention that real programmers use cat . Well,
I want to create a web page that allows the user to initiate a
My to_json call sometimes seems to include some extra cruft that I'm not expecting:
Lets say I have two tables - Cat and Cat owner that are linked
On a rooted android device, I tried to run a cat command that read
If I have a string that contains Cat how could I check before hand
I have a list of, let's say [Cat, Dog, Cow, Horse] , that I
cat test.txt #this is comment line 1 line 2 #this is comment at line
I have a web application with a category tree that is published on the
I would swear on my cat's grave that I just read about such a

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.