This is an odd situation. It is due to the fact that these scripts were coded for IE 6, or before IE 7, or thinking primarily about the differences between IE 6 and other browsers.
You see, IE 7 can do Ajax the same way that other browsers do, but won't do it locally. The script could be rewritten to make IE 7 take the IE 6 path when the page is local, but it isn't really worth it. Test in FF locally, IE 7 online.
You can do something like:
Code:
function ajaxinclude(url) {
var page_request = false
if (window.XMLHttpRequest&&(!window.ActiveXObject||/http/.test(url))) // 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")
} . . .
To force IE 7 into using the Active X approach locally, but this runs the risk of sometimes also making it do so live, and the window.XMLHttpRequest approach is considered more efficient, and can be run live on IE 7 browsers allowing javascript but not Active X, so is certainly more likely to work. Adding these extra conditions could possibly cause problems for other browsers as well. You could do this locally to test the layout of your script's output in IE 7 though, but use the script without this modification when uploading it to the server.
Bookmarks