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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:46:02+00:00 2026-05-27T05:46:02+00:00

Hello fellow coder i am new to web programming and i need so major

  • 0

Hello fellow coder i am new to web programming and i need so major help please 🙂

well basically what i want is that when a user clicks on a image it changes the text in the inner html. Now I want the text changing done by using javaScript but only using the if statement. What i mean is when we click on the image we can check the id and if we are clicking on the image change the inner text of the html

here is some code that i have managed to do 🙂

<html>
<head>
<title> Welcome to Test </title>
 <script language="Javascript">
        image1=new Image
        image1.src="picture1.jpg"
        image2=new Image
        image2.src="picture2.jpg"
    function Change(){
         document.getElementById("lol").innerHtml = "Hello world"
    }
 </script>
</head>
<body  style = " margin: 0px; padding:18px;">
   <table  align = "center" border = "1" width="500px"  >
        <tr>
            <td colspan="10" > <img src ="Logo.jpg" alt="This is the logo ">       </td>        <tr/> 
        <tr>  <td  colspan="10"  >   <tr/>    
        <tr> <td> <td/>  <td> <td/>  <td> <td/>  <td> <td/>  <td> <td/>        <tr/>    
        <tr><td> <td/>  <td> <td/>  <td> <td/>  <td> <td/>  <td> <td/>        <tr/>   
        <tr> <td> <td/>  <td> <td/>  <td> <td/>  <td> <td/>  <td> <td/>         <tr/>  
  </table>
  <object width="800" height="600" data="GreatMovie.wmv"></object>
  <img src = "buttonUp.jpg" alt =" click me " width = " 200" height ="300" border=0 name = "buttonOne"> 
  <a id="lol" href="#" onClick="Change();" onMouseOver="document.picture.src=image2.src" onMouseOut="document.picture.src=image1.src" > Hello
    <img name="picture" src="picture1.jpg" alt="My Image" />
    Hello
</a>
</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-27T05:46:03+00:00Added an answer on May 27, 2026 at 5:46 am

    It is innerHTML not innerHtml.

    Here is a JSFIDDLE link: http://jsfiddle.net/ywPfK/

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

Sidebar

Related Questions

Oh hello there, fellow SO members, I have a web service that returns XML
Hello fellow software developers. I want to distribute a C program which is scriptable
Hello fellow programmers. I have a SQL Server 2005 query that is taking a
Hello fellow developers, assume I had a program that required authorization granted to him
hello fellow java developers. I'm having a bit of an issue here. I have
I want to include Core Location and I'm trying to follow this tutorial: http://www.mobileorchard.com/hello-there-a-corelocation-tutorial/
Hello can anybody solve this please I'm creating the object in the action class
Hello I am new to asp.net. I am confused what is the difference between
hello fellow java developers. I'm having a very strange issue. I'm trying to read
I'm very new to iPhone development so please bear with me. I'm following the

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.