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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T00:21:55+00:00 2026-06-06T00:21:55+00:00

I have some problems with Javascript. In fact, I’m just newbie in that script

  • 0

I have some problems with Javascript. In fact, I’m just newbie in that script language so I need some help..
Q: how to make this link active:

<a href="#box1">something</a>

this link is just link to the div which is located in index.html file, so there is no loading of page.
and here is the div

<div id="box1" class="box">
<h3><a name="box1">something</a></h3>
</div>
  • 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-06T00:21:58+00:00Added an answer on June 6, 2026 at 12:21 am

    Since you’re just starting out, I’d suggest you use a library such as jQuery. So, if your HTML is like this:

    <div id="box1" class="box">
    <h3><a name="box1">something</a></h3>
    </div>
    <div id="box2" class="box">
    <h3><a name="box2">something</a></h3>
    </div>
    <div id="box3" class="box">
    <h3><a name="box3">something</a></h3>
    </div>
    

    And you have a CSS class called youarehere:

    .youarehere { color:white; background:green; }
    

    With jQuery you could write something along the lines of:

    $(".box > a").click(function() {             // when clicking any of these links
        $(".box > a").removeClass("youarehere"); // remove highlight from all links
        $(this).addClass("youarehere");          // add highlight to clicked link
    })
    

    In plain JS, it takes a bit more effort to achieve this. Do yourself a favor and don’t reinvent the wheel – people have already taken care of this, so use the product of their labor to make your life easier.

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

Sidebar

Related Questions

I have some problems with a PHP script that calls a Bash script.... in
The situation is this: I have some JavaScript that creates an interactive dialogue (and
I'm trying to call a JavaScript function through PHP and have met some problems.
I have some problems with animated buttons in android. This is my code: private
I have some problems figuring out how to group to certain variables in javascript.
I am trying to validate a password string with javascript and need some help
I have some problems with making Javascript work with Django template inheritance. According to
As title says i have some problems with IE8 and Javascript. It's known about
I have a problem with some Javascript where I set off a setCallbackHandler() and
I have some problems with displaying some Arabic text in my iPhone application. When

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.