Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,665
    Thanks
    6
    Thanked 1,006 Times in 979 Posts

    jQuery: IE7 load() issues

    Can anybody tell me why IE7 is loading external content very slowly and not applying the hash tag properly? http://www.primacom.net/~k6531190/temp/contact.html

    Click on the rep locator select box and see for yourself. The list of states is loading perfectly in all browsers including IE8 but in IE7 it’s slow as hell. Additionally, IE7 doesn’t load the content if one clicks on a state. Alerting out the value of $(this).attr('href'); shows that IE7 seems to incorrectly prepend the entire URL rather than just outputting the hash tag that is the value of each href (e. g. href="#AZ").

    Why is that and what’s wrong? Unfortunately I have nothing like Firebug for IE7, and even if, I would probably not know how to find the issue.
    Last edited by VIPStephan; 04-14-2010 at 12:08 AM. Reason: issue solved

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,665
    Thanks
    6
    Thanked 1,006 Times in 979 Posts
    OK, seems like I alway answer my own posts here.
    After hours of racking my brain I found the annoyingly simple answer as to why IE7 is so slow: It’s the semi-transparent 2×2 pixel sized background image! Isn’t that stupid??? If I make it a plain white background color without the image then it’s as smooth as in all other browsers (well, almost at least, but acceptable).

    The only issue left right now is the href normalization with which IE has a (apparently known) issue. In all browsers the value of the href attribute is output as it is. In IE7 and lower the full URL of the page is prepended instead. So I need to use some kind of regular expression string replace to remove everything before the hash. I’m gonna try it but would still appreciate any help I can get.

  • #3
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,665
    Thanks
    6
    Thanked 1,006 Times in 979 Posts
    Hah! Solving the href issue is simpler than I thought. There’s not even a regex replace necessary, a simple
    Code:
    var elID = $(this).attr('href').substring($(this).attr('href').indexOf('#'));
    does the trick.

    Thanks for your help, y’all.
    Last edited by VIPStephan; 04-14-2010 at 12:08 AM.

  • #4
    Senior Coder Spudhead's Avatar
    Join Date
    Jun 2002
    Location
    London, UK
    Posts
    1,856
    Thanks
    8
    Thanked 110 Times in 109 Posts
    You're welcome

    Quote Originally Posted by VIPStephan View Post
    Unfortunately I have nothing like Firebug for IE7, and even if, I would probably not know how to find the issue.
    Might be a stupid question, but have you got the IE developer toolbar installed? It's no Firebug, but it's better than nothing.

  • #5
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,665
    Thanks
    6
    Thanked 1,006 Times in 979 Posts
    I have IETester and there is a debug bar but I haven’t figured out how to check scripts there yet (as I don’t even have in Firebug because I’m a mediocre JS developer at best).


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •