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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T15:08:34+00:00 2026-06-05T15:08:34+00:00

I am new to HTML and Javascript. Please someone can help me with the

  • 0

I am new to HTML and Javascript. Please someone can help me with the following.
The following code will display 579 as normal after the page is loaded. But, I need
it to display a different number without refreshing the whole page. For example, if something triggers like mouse click, then 795 (images) will display. What could I do to
make new number in images to display on the same position as previously. Thank you very much.

`

DisplayNumImg(5,7,9);

<a href="#" onclick="DisplayNumImgChanged(7,9,5)" /a>



#child2-3
{
 position: absolute;
 width: 165px;
 height: 15px;
 left: 5px;
 top: 40px;
}

.thumb_child1
{
  float:right;
  margin:0px;
}


function DisplayNumImg( a, b, c)
{

  var s;

  if ( a == 5 ) {
     s = '<img class="thumb_child1" src="./images/5_blu.png"> ';
     document.write( s );
  }

  if ( a == 7 ) {
     s = '<img class="thumb_child1" src="./images/7_blu.png"> ';
     document.write( s );
  }

  if ( a == 9) {
     s = '<img class="thumb_child1" src="./images/9_blu.png"> ';
     document.write( s );
  }
}

function DisplayNumImgChanged( a,b,c )
{
   // please help me with code here or something that you think it would work. Thanks.
}

`

  • 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-05T15:08:38+00:00Added an answer on June 5, 2026 at 3:08 pm

    Ok, first off: I strongly suggest that you should learn and use jQuery (and then, once you have, if you still want to improve as a developer, go back and learn how it works by learning about the Javascript code that powers it). It will make things much easier for you.

    In this case, it sounds like what you are trying to do is update the src attribute on your image element. With jQuery this can be done as follows:

    $('.thumb_child1').attr('src', './images/9_blu.png');
    

    In raw JS, that would be something like:

    var thumbs = document.getElementsByTagAndClassName(null, 'thumb_child1');
    for (var i = 0; i < thumbs.length; i++) {
        thumbs[i].src = './images/9_blu.png';
    }
    

    (Although the above code is untested, so post back if you have issues.)

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

Sidebar

Related Questions

Hope someone can help. I am new to javascript so please forgive any mistakes.
I would whether someone can help me please. I have the following test form
can someone please help me with this code, i'm missing something but can't figure
I somewhat new to Javascript and I'm stuck on this one item. Can someone
Can someone please tell me what's wrong with this code? Basically what I am
I wonder whether someone can help please. I'm trying to put together a script
Very new to javascript and html-type stuff. I wanted to just make a quick
After inserting new html to DOM,I need to add some listeners to it. But
how can I change my Html into SafeHtml Html htmlText = new Html(); htmlText.setText(result.getText());
I have a page that i have been starting to setup here http://www.brandybrowauto.com/NEW.html that

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.