sushilborhade Posted June 18, 2005 Posted June 18, 2005 Hi, I want to load client machine xml file into my html page using XMLHTTP. If I open the my file by giving D:\xmlhttpPRG\loadXML.html then it loads the xml file. This works fine but if I open this file by giving URL ie. http://127.0.0.1/xmlhttpPRG/loadXML.html then its gives an error "Permission denied" ><script language="javascript"> var xmlhttp = new ActiveXObject ("Microsoft.XMLHTTP"); xmlhttp.Open("GET", "file:///C:/sample.xml", false); xmlhttp.Send(); alert(xmlhttp.responseText); </script> So, how can I load client machine xml file into my html page using URL. If anybody knows the solution then pls send me the solution. Thanks. Quote
TweezerMan Posted June 18, 2005 Posted June 18, 2005 Welcome to the forums, sushilborhade! To browse to a URL on your own machine (http://127.0.0.1/), you'd need 1) a web server of some kind running on your PC, and 2) the port that the web server uses must be open in your PC's firewall. I suspect you're probably not running a web server on your local PC. Quote
stevevan Posted June 18, 2005 Posted June 18, 2005 Welcome to the forums. In case you are looking for a web server that you can run locally to test out scripts and such before they are posted, try a google search for XAMMP. Quote
TCH-Don Posted June 18, 2005 Posted June 18, 2005 Welcome to the forum, sushilborhade Yes if you need to install a web server on your computer xampplite is very easy. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.