views:

24

answers:

1

I am trying to do a simple Ajax Demo:

  1. HTML file with textbox and button
  2. Text file whose content is displayed in textbox when button is clicked.

The example works fine in Mozilla but in IE it gives error Access Denied on the line where I use the open method.

May be it's restricting the access to the local file system. What should be the solution to make this example work?

+2  A: 

Put your files on a server (local testing server on your computer).

aularon
:(. No servers still its only the basic app. And both file reside in same folder.
asb
@asb, though it's still basic, but this functionality `XMLHttpRequest` requires an HTTP request as from the name, some browsers ignore than and emulate that with a local file request. Installing a testing server is easy, check [WampServer](http://www.wampserver.com/).
aularon
Thanks, I did on tomcat it works still i feel very odd about IE. anyways now things are working
asb