Results 1 to 7 of 7

Thread: Ajaxtab does not work in IE7 ?

  1. #1
    Join Date
    Apr 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Ajaxtab does not work in IE7 ?

    Hi everyone,

    I have got a webpage running the Ajaxtab http://www.dynamicdrive.com/dynamici...axtabscontent/, it works fine in Firefox and Ie6 however when i load the page on IE 7, whenever i click on the tabs i get the page cannot be found error. Can anyone help me with this thanks in advance.

  2. #2
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,627
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Default

    Are you sure that the external file you are referring exists in the correct path?

    If it is possible provide either a link to your page or the source code.

    Ajax Tabs Content script demo page provided in DD works without any error.

  3. #3
    Join Date
    Apr 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi
    As im running the page on a localhost i am unable to provide the link but here is the source code.
    Code:
    <div id="content2"><!--Start of #content2-->
    
    <ul id="maintab" class="shadetabs">
    <li class="selected"><a href="#default" rel="ajaxcontentarea" onmouseover="return escape('Home sweet home')">Home</a></li>
    <li><a href="phpinfo.php" rel="ajaxcontentarea" onmouseover="return escape('Speakers')">Speakers</a></li>
    <li><a href="program.php"  onmouseover="return escape('Get to know our programmes')">Program</a></li>
    <li><a href="external.htm" rel="ajaxcontentarea" onmouseover="return escape('Take a look at our sponsors')">Sponsors</a></li>
    <li><a href="external.htm" rel="ajaxcontentarea" onmouseover="return escape('Whos presenting?')">Presentation</a></li>
    <li><a href="reg.php" rel="ajaxcontentarea" onmouseover="return escape('What are you waiting for?')">Registration</a></li>
    </ul>
    The page links fine when i remove the rel="ajaxcontentarea" from the code. Thanks.

  4. #4
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    I don't think AJAX works in IE7 on localhost. That could be the reason why you get an error.

    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by thetestingsite View Post
    I don't think AJAX works in IE7 on localhost. That could be the reason why you get an error.

    Hope this helps.
    Right. But, it can if that is what you need it to do, change:

    Code:
    function ajaxpage(url, containerid, targetobj){
    var page_request = false
    if (window.XMLHttpRequest) // if Mozilla, Safari etc
    page_request = new XMLHttpRequest()
    else if (window.ActiveXObject){ // if IE
    try {
    page_request = new ActiveXObject("Msxml2.XMLHTTP")
    } 
    catch (e){
    try{
    page_request = new ActiveXObject("Microsoft.XMLHTTP")
    }
    catch (e){}
    }
    }
    else
    return false
    to:

    Code:
    function ajaxpage(url, containerid, targetobj){
    var page_request = false
    if (window.ActiveXObject){ // if IE
    try {
    page_request = new ActiveXObject("Msxml2.XMLHTTP")
    } 
    catch (e){
    try{
    page_request = new ActiveXObject("Microsoft.XMLHTTP")
    }
    catch (e){}
    }
    }
    else if (window.XMLHttpRequest) // if Mozilla, Safari etc
    page_request = new XMLHttpRequest()
    else
    return false
    I think you can see what's happening here which is - IE 7 now supports window.XMLHttpRequest but, not locally while, it still supports window.ActiveXObject locally (with permission).
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #6
    Join Date
    Apr 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the reply i got the page working on localhost now, but when i click on the tab now it does not show the cannot find content page but it seems to be unable to retrieve the content i see the ajax logo just keep spinning without the content loading.

  7. #7
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Well, that depends upon what you mean by localhost. If you mean simply running it locally on your computer, the demo (ajaxtabscontent.zip) works fine in IE 7 with that one change. If you mean something else and/or if you are loading pages that the browser might see as being on another domain, there could still be problems.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •