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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T21:55:01+00:00 2026-05-13T21:55:01+00:00

I have the following code and it’s working (as usual) in everything but IE.

  • 0

I have the following code and it’s working (as usual) in everything but IE. It’s giving me an unexpected call to method or property access in Jquery and I have no idea how to debug it. I’ve been using the IE developer toolbar, which is useless for this error and just gives me a line no 12 (inside the jquery script).

Any help is v much appreciated:

<script type="text/javascript">
$(document).ready(function () {

    $.history.init(pageload);

    $('a[href=' + window.location.hash + ']').addClass('selected');

    $('a[rel=ajax]').click(function () {

        var hash = this.href;
        hash = hash.replace(/^.*#/, '');
        $.history.load(hash);

        $('a[rel=ajax]').removeClass('selected');
        $(this).addClass('selected');
        $('.loading').show();

        getPage();

        return false;
    });
});

function pageload(hash) {
    if (hash) getPage();
}

function getPage() {

    hash = document.location.hash;
    hash = hash.replace(/^.*#/, '');
    var data = 'page=' + encodeURIComponent(hash);
    $.ajax({
        url: "index.php",
        type: "POST",
        data: data,
        cache: false,
        success: function (html) {
            $('.loading').hide();
            $('tbody').html(html);

        }
    });
}
</script>

Here is the history plugin: http://plugins.jquery.com/project/history

And here is the demo I have been following:
http://plugins.jquery.com/project/history

Still changing window.location back to document.location doesn’t seem to make a difference

I’m lost on this one. When I change the tag I’m calling to it does post so it’s working, but in IE the design is all broken and the next links I click on don’t post. Really strange!! Works fine in firefox, opera, etc.

  • 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-13T21:55:01+00:00Added an answer on May 13, 2026 at 9:55 pm

    I’m a bit surprised IE complains about it, but it’s a good thing it does: You’re missing a declaration in getPage for hash (e.g., put var in front of the first use).

    On the others it’s presumably creating an implicit global (a property of the window object called hash), which is of course a Bad Thing(tm), but as I understand it it’s correct according to the specification (the relevant sections being 8.7 [“The Reference
    Type”] and 10.1.4 [“Scope Chain and Identifier Resolution”]).

    Still surprised IE is complaining about it, though. It must have to do with the scope in which jQuery is calling your click handler.

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

Sidebar

Related Questions

I have following code in button click Response.Write(window.open('Contact.aspx')); The above code is working.but if
I have following code which call a task after every 20 min and its
I have following code <!DOCTYPE html> <html> <head> <title>jQuery goes to DOM-ville</title> <style> #change-me
I have following code $criteria=new CDbCriteria; $criteria->with = array('owner'=>array('select'=>array('*','payment_info'=>'payment_account'))); which works fine, but when
I have following code which works fine in iPhone application but in iPad I
I have following code: Tools::Logger.Log(string(GetLastError()), Error); GetLastError() returns a DWORD a numeric value, but
I Have following code: Controller: public ActionResult Step1() { return View(); } [AcceptVerbs(HttpVerbs.Post)] public
I have following Code Block Which I tried to optimize in the Optimized section
I have following code in my application: // to set tip - photo in
I have following code in my Application. Comments in my code will specify My

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.