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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:49:26+00:00 2026-05-25T09:49:26+00:00

Using jquery address I’m setting my href links like so: <a href=#view_profile=123>view 123</a> When

  • 0

Using jquery address I’m setting my href links like so:

<a href="#view_profile=123">view 123</a>

When calling my address change event:

$.address.change(function(e) {
   alert(e.value);
});

I see values from FF and Chrome as I would expect:

/view_profile=123

IE however returns the full URL path with a preceding “/” like so:

/http://localhost/#view_profile=123

Any idea why IE does this and what’s the best way to fix it? I’ve tried several things but it’s the same every time.

Here is the code that I use to get the link path:

// Setup jQuery address on some elements
$('a').address();

// Run some code on initial load
$.address.init(function(e) {
  // Address details can be found in the event object
});

// Handle any URL change events
$.address.change(function(e) {
    alert(e.value);

    var urlAux = e.value.split('=');
    var page   = urlAux[0];
    var arg  = urlAux[1];

    alert("page: " + page);
    alert("arg: " + arg);

    if (page == "/view_profile") {
        ...
    }
});
  • 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-25T09:49:27+00:00Added an answer on May 25, 2026 at 9:49 am

    I found a work around. If I add a class tag to the link and look for a click event on the class I can set the URL and it triggers the jquery address change event correctly.

    $(".testclass").click(function() {
    
        var id = null;
        if ($.browser.msie) {    
            id = $(this).attr('href').slice($(this).attr('href').indexOf('#')+1);
        } 
        else {    
            id = $(this).attr('href').substr(1);
        }
    
        alert("ID: " + id );
    
        location.href = "#view_profile=" + id; 
        return false;
    });
    

    I also had to set the href value to the ID like so:

    <a href="#123" class="testclass">123</a>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using jQuery Address Plugin and I have the following code. $.address.change(function(e) {
I'm doing an AJAX call using jQuery's JSON feature. function get_words_json(address, username, paging_value) {
I have been using jQuery address plugin and it passes an event.value which might
I want to know how to get client IP address using jQuery? Is it
Using jQuery, how do you bind a click event to a table cell (below,
I'm using jQuery address to enable loading specific content from other pages and to
I'm using jQuery Address to load in my content, but it's doing it twice
I'm using the jQuery Address plugin to do some dynamic address changes. So far
I've been using the jQuery address plugin to enable back-button support, which has been
i'm using asual jquery-address, tabs example and want to add datepicker to the Extra

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.