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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T14:39:36+00:00 2026-06-09T14:39:36+00:00

I wrote a script which changes the source of an image upon mouse over

  • 0

I wrote a script which changes the source of an image upon mouse over the image,
at first it worked, but after adding a second image which uses the same code both stopped working.

The issue I am experiencing is that the image does not change on mouse over as it should. It looks as if the image is not found – however I am really sure the images’ sources point to the right path.

I have asked for other opinions as well and I cannot see what I am doing wrong. I would really appreciate your help or any input on this.

Below is the code I am using.

<html>
  <head>
    <script type="text/javascript">
      var images= new Array();
      images[0] = "Benjamin/Untitled-3.png";
      images[1] = "Benjamin/Untitled-4.png";
      images[2] = "Benjamin/Update.png";
      images[3] = "Benjamin/Update2.png";

      function Change()
      {
        document.getElementById("image").src = images[1];
      }

      function GoBack()
      {
        document.getElementById("image").src = images[0];
      }

      function GobackAgain()
      { 
        document.GetElementById("Update").src = images[2];
      }

      function ChangeAgain()
      {
        document.getElementById("Update").src = images[3];
      }
    </script>

    <style type="text/css">
      body
      {
        background-color:#1c1a1a;
      }
    </style>

    <div align="center">
      <img src="Untitled-2.png" width="325" height="191">
    </div>

  </head>

  <body>
    <img onmouseover="Change()" 
         onmouseout="GoBack()" 
         id="image" 
         STYLE="position:absolute; TOP:35%; LEFT:10%; WIDTH:204px; HEIGHT:278px" 
         src="Untitled-3.png">

    <img onmouseover="ChangeAgain()" 
         onmouseout="GoBackAgain()" 
         id="Update" 
         STYLE="position:absolute; TOP:35%; LEFT:50%; WIDTH:204px; HEIGHT:278px" 
         src="Update.png">
  </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-06-09T14:39:37+00:00Added an answer on June 9, 2026 at 2:39 pm

    Rename GobackAgain to GoBackAgain and replace GetElementById with getElementById.

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

Sidebar

Related Questions

I wrote a batch script which recursively updates my source code against the company's
I wrote a bash script which renames MythTV files based upon data it receives.
I wrote this script which counts occurrences of particular pattern in a given file.
I recently wrote a script which queries PyPI and downloads a package; however, the
I have wrote a script to detect when I reach the div element which
I wrote a script parsing a .csv file in groovy using tokenize, which ended
I wrote a perl script a while ago which logged into my online banking
I wrote the following script, which generates a SyntaxError : #!/usr/bin/python print Enter the
I wrote a bash script which can modify php.ini according to my needs. Now
I have wrote this little script which generates a nice random password. The problem

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.