PDA

View Full Version : Ajax Tabs Content and IE 7 - odd tidbit



vensland
11-26-2006, 08:51 PM
1) Script Title: Ajax Tabs Content

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/index.htm

3) Describe problem: I am using this script to build a new page and play around with this new ajax script a bit. The computer I am doing it on has IE6 on it and everything worked just fine. I have the files stored on an external drive and when I plugged it into my laptop with IE 7 on it and displayed the pages they didn't work. When you click on the links they open but not in the div location, they open as the page themselves. This happens to both your demo and the one I was working on in IE 7. However, if I just copied the files out to an actual web server then they display fine in IE 7. There is just something about running it in a file location rather than from a website.

Thanks,
Dave.

ddadmin
11-27-2006, 12:58 AM
Hi Dave:
The issue is with IE7's support of the below object for making Ajax calls:


window.XMLHttpRequest

This is the same method Firefox/Opera uses btw. When using this object, IE7's security model means you can only make Ajax requests while connected to the web server, hence the examples only work when viewed online. This isn't a problem with the script, just a limitation of IE7.

IE7 also supports the old IE method of making Ajax calls, using:


window.ActiveXObject

This object on the other hand does work offline, hence you've been able to run any of the Ajax scripts on DD offline as well in IE6 for example. Since the Ajax scripts on DD default to using the former/newer method of Ajax invocation in IE7, you run into the offline/online limitation in that browser.