Results 1 to 7 of 7

Thread: AJAX Tabs and Internet Explorer

  1. #1
    Join Date
    Jun 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default AJAX Tabs and Internet Explorer

    Hi there,

    I'm working on updating a website and I was really pleased with how AJAX Tabs looked and worked (I had been working on writing something similiar, but this saved me a lot of time).

    Before I used it I tested the demo once it was setup on my server in all the major browsers and it worked.

    However once I finished populating each of the tabs/pages with my own content it all stopped loading in Internet Explorer (IE)

    The first tab always loads since the code for that information is all right there before the start function is called. However when you click on any subsequent tabs the bundled loading icon and "Requesting content..." appear but it never loads.

    It still works fine in Firefox, Mozilla, and Safari however.

    Any ideas?

  2. #2
    Join Date
    Jun 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I got it working...sortof.

    I'm running the site off a local tomcat server and periodically testing it off a temporary Sun Application Server, both of them do not use 80 for their port as they are testing servers and I don't want them conflicting with the production stuff on the server(s)

    It seems that Firefox handles 8080 just fine for each subsequent request but even though internet explorer is loaded to say

    localhost:8080/digiXJSP

    every time it looks for the content to load into another tab it looks in

    localhost/digiXJSP/..path to content..


    I changed the configuration around locally so I can test in IE but does anyone have an idea for how to modify the script to take into account ports?

    I quickly tried in the startajaxtabs function:

    Code:
    ajaxpage(this.getAttribute("href") + ":8080", this.getAttribute("rel"), this)
    But that broke stuff.

  3. #3
    Join Date
    Jun 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Lightbulb Solution Found--Problem in AJAXTab Script

    It turns out that it isn't an error in IE, its a problem (sortof) with the script.

    offending segment:
    Code:
    var modifiedurl=ulistlink.getAttribute("href").replace(/^http:\/\/[^\/]+\//i, "http://"+window.location.hostname+"/")
    hostname returns the hostname portion of the url
    host returns the hostname + the port

    so the changed code would be
    Code:
    var modifiedurl=ulistlink.getAttribute("href").replace(/^http:\/\/[^\/]+\//i, "http://"+window.location.host+"/")
    Both IE & Firefox/Safari's take on what to do make sense, so neither is 'right'

  4. #4
    Join Date
    Aug 2004
    Posts
    9,893
    Thanks
    3
    Thanked 966 Times in 954 Posts
    Blog Entries
    15

    Default

    Yep, this is a bug of the script, and has been discussed here: http://www.dynamicdrive.com/forums/s...highlight=port Looks like I should get to updating the script for this. I just didn't anticipate people running into this problem, or at least, rarely.

  5. #5
    Join Date
    Feb 2008
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    This issue still hasn't been fixed in v2.1!

  6. #6
    Join Date
    Jun 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for this bug fix. My test site also runs on an non-standard port.

    Would be nice to see this simple fix incorporated in the published script.

  7. #7
    Join Date
    Jul 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up

    Quote Originally Posted by rgalgon View Post
    It turns out that it isn't an error in IE, its a problem (sortof) with the script.

    offending segment:
    Code:
    var modifiedurl=ulistlink.getAttribute("href").replace(/^http:\/\/[^\/]+\//i, "http://"+window.location.hostname+"/")
    hostname returns the hostname portion of the url
    host returns the hostname + the port

    so the changed code would be
    Code:
    var modifiedurl=ulistlink.getAttribute("href").replace(/^http:\/\/[^\/]+\//i, "http://"+window.location.host+"/")
    Both IE & Firefox/Safari's take on what to do make sense, so neither is 'right'
    THANK YOU!
    I was having this problem on IE and really had no idea what was going on... thank you very much for sharing this solution
    this is the best simple and open ajax tabs code there is, congratulations on getting it even better

Bookmarks

Posting Permissions

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