How To Load Client Side Xml File Using Xmlhttp?

Hi,<br />I want to load client machine xml file into my html page using XMLHTTP.<br />If I open the my file by giving <br />D:\xmlhttpPRG\loadXML.html<br />then it loads the xml file. This works fine but if I open this file by giving URL ie.<br /><a href="http://127.0.0.1/xmlhttpPRG/loadXML.html" target="_blank">http://127.0.0.1/xmlhttpPRG/loadXML.html</a><br />then its gives an error "Permission denied"<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--><script language="javascript"> <br />        var xmlhttp = new ActiveXObject ("Microsoft.XMLHTTP"); <br />        xmlhttp.Open("GET", "file:///C:/sample.xml", false); <br />        xmlhttp.Send(); <br />        alert(xmlhttp.responseText);<br /></script><!--c2--></div><!--ec2--><br /><br />So, how can I load client machine xml file into my html page using URL.<br />If anybody knows the solution then pls send me the solution.<br /><br />Thanks.<!--content-->
Welcome to the forums, sushilborhade! <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/thumbup1.gif" style="vertical-align:middle" emoid=":thumbup1:" border="0" alt="thumbup1.gif" /> <br /><br />To browse to a URL on your own machine (<!-- m --><a class="postlink" href="http://127.0.0.1/">http://127.0.0.1/</a><!-- m -->), 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.<br /><br />I suspect you're probably not running a web server on your local PC.<!--content-->
Welcome to the forum, sushilborhade. <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><!--content-->
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.<!--content-->
Welcome to the forum, sushilborhade <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/kicking.gif" style="vertical-align:middle" emoid=":dance:" border="0" alt="kicking.gif" /><!--content-->
Welcome to the forum, sushilborhade <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /> <br /><br />Yes if you need to install a web server on your computer xampplite is very easy.<!--content-->
 
Back
Top