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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:39:42+00:00 2026-05-13T12:39:42+00:00

Hi guys I’ve developed a google maps application witha neat search feature – however

  • 0

Hi guys I’ve developed a google maps application witha neat search feature – however I’ve noticed that I would like to have something like what the facebook guys have done as in having a hardlink to a page that is generated by an ajax query. Example you click on a link in facebook and it appends to the current url and you can copy paste the new url to get the requested page … how do I implement something like that…

  • 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-13T12:39:43+00:00Added an answer on May 13, 2026 at 12:39 pm

    You can use the location.hash (the part of the URL after the #) to set “hard links” from withing JavaScript. This does not cause the page to reload, like changing the location.href does, but you can fetch the value and use it in JavaScript.

    Consider this example:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <head>
        <title>Hash test</title>
        <meta http-equiv="content-type" content="text/html; charset=UTF-8">
        <script type="text/javascript">
        window.onload = function() {
            // The substring(1) removes the # from the hash.
            var hash = window.location.hash.substring(1);
    
            // Use a default value if no has was passed.
            if(hash == '') {
                hash = 'Nothing';
            }
    
            // Use the value.
            document.getElementById('selection').innerHTML = hash;
        }
    
        /** Sets the hash and updates the page value */
        function setHash(newHash) {
            window.location.hash = newHash;
            document.getElementById('selection').innerHTML = newHash;
        }
        </script>
    </head>
    <body>
        <div>
            <div>
                <a href="javascript: void();" onclick="setHash('page1');">Page 1</a> | 
                <a href="javascript: void();" onclick="setHash('page2');">Page 2</a> |
                <a href="javascript: void();" onclick="setHash('page3');">Page 3</a>
            </div>
            <div>
                You have selected: <span id="selection">...</span>
            </div>
        </div>
    </body>
    </html>
    

    When you click on one of the page links, the location.hash is changed, the URL of the browser is updated and the value used in the page is changed. If the user then copies the URL directly from the address bar, or bookmarks it, the selected page will be reloaded when the URL is requested again.

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

Sidebar

Related Questions

No related questions found

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.