Advanced Search

Results 1 to 4 of 4

Thread: Explorer error with ajaxtabs

  1. #1
    Join Date
    Feb 2008
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Explorer error with ajaxtabs

    1) Script Title: DD Ajax Tabs

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...axtabscontent/

    3) Describe problem:
    Have now implemented the (really good) Ajax Tabs on a prospect website. All works well in Firefox and Opera, but get an error when loading some content using IE (Internet Explorer) 6 and 7.
    The MS Script Debugger tell me it's on this line in ajaxtabs.js:
    > document.getElementById(divId).innerHTML=page_request.responseText;
    and that the error is an "unknown runtime error".

    My guess is that it is something in the page I'm trying to load that interferes with the ajaxtab-script, but have no further ideas...
    To see the error live go to http://yabot.net/dev/3.nsf and perform a search from the top right search box...
    Any help appreciated or just point me in the right direction.
    /Mats

  2. #2
    Join Date
    Feb 2008
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Lightbulb A little further

    Change the ddajaxtabs.loadpage to trap the IE error and have had some progress
    Still not a really pretty solution but with some more hours and your help (please) I'll get it right.

    Ps. Can't we just make IE go away?

    Code:
    ddajaxtabs.loadpage=function(page_request, pageurl, tabinstance){
    	var divId=tabinstance.contentdivid
    	document.getElementById(divId).innerHTML=ddajaxtabssettings.loadstatustext //Display "fetching page message"
    	if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1)){
    	try {
      		document.getElementById(divId).innerHTML=page_request.responseText;
    	}
    	catch (e) {
    		 // IE fails unless we wrap the string in another element.
    		document.getElementById(divId).innerHTML="";
    		var parentElement = document.getElementById(divId);
    		var wrappingDiv = document.createElement('div');
    		wrappingDiv.innerHTML = page_request.responseText;
    		parentElement.appendChild(wrappingDiv);
    	}	
    	ddajaxtabs.ajaxpageloadaction(pageurl, tabinstance);
    	}
    }

  3. #3
    Join Date
    Feb 2008
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default More info

    The above method work but then all my other scripts on that page doesn't kick in as the ajax-page is in an other place in the DOM.
    Seems that IE has a problem with the form-tag...
    Giving up for now

  4. #4
    Join Date
    May 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    It worked for me Yabot.

    Thanks for posting your solution.

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
  •