PDA

View Full Version : Problems with Ajax and IE7 running from a CD



klbollwahn
01-16-2007, 01:32 PM
1) Script Title: Problems with Ajax and IE7 running from a CD

2) Script URL (on DD):

http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/index.htm

http://www.dynamicdrive.com/dynamicindex17/ajaxincludes.htm

3) Describe problem: When running these from a CD-ROM in IE7, these Ajax scripts fail to run. They run fine from a server (I'm using XAMPP as a localhost) and they have worked fine from both a server and CD or local hard drive with IE6 and Firefox. For demo purposes, I need to be able to run the site from a CD-ROM. Again with IE 6 and Firefox they run fine.

ddadmin
01-16-2007, 08:35 PM
In IE7, Ajax will only run when it's online (within a server environment). Localhost is fine though- is the script on the CD being run inside localhost?

joel_123
02-20-2007, 04:56 PM
In IE7, Ajax will only run when it's online (within a server environment). Localhost is fine though- is the script on the CD being run inside localhost?

I am also having this problem - if I understand correctly the Ajax is more JSON and is not being used for server calls but to enable an "include" of an html snippet

This does exactly the same thing with a project I am running from a CD - IE7 doesnt include the snippet for some reason.

Maddening! Now I have to redo the CD - do you know if there is any setting to reduce the security level to allow the cd to run correctly?

klbollwahn
02-20-2007, 05:26 PM
To run from a CD-ROM I had to set up a localhost server to run from the CD. I used XAMPP from www.appachefriends.org and a fix I found on their form here.

http://www.apachefriends.org/f/viewtopic.php?t=21294

I then set the CD-ROM to autorun and start the localhost with my content as the default page.

Hope you find this helpfull.

joel_123
02-20-2007, 05:44 PM
Thank you for the help - I think my problem may be a more basic case of security over-tightening by Microsoft.

I am running the prototype javascript library and using it to import a local bit of html - not off a webserver (is that what you meant you did?) - unfortunately I have created a cd run of several thousand and it all worked very nicely before IE7....so I need to either suggest a patch that the man-on-the-street can handle or redo all the cds and send them all out. Cheers for the tip, I think that I am perhaps going to have to reissue them...

jscheuer1
02-20-2007, 06:41 PM
An alternative would be to prevent IE 7 from taking this code branch:


if (window.XMLHttpRequest) // if Mozilla, Safari etc
page_request = new XMLHttpRequest()

One way to do this would be to add a span to your page(s) inside a conditional:


<!--[if gte IE 7]>
<span id="ie7span" style="display:none;"></span>
<![endif]-->

Then we could go back to the code from these scripts:


if (window.XMLHttpRequest&&typeof ie7span=='undefined') // if Mozilla, Safari etc
page_request = new XMLHttpRequest()