Username and Password in URL

Zabbah

New Member
I am trying to load an XML file that asks for a username and password.The code I'm using is as follows that I am trying to send the username and password in the URL:\[code\]xmlhttp.open("POST","http://admin:[email protected]/myfile.xml",false);\[/code\]The full code of my page looks like this:\[code\]<html><body><textarea id="test1" name="test1" cols="90" rows="30">XML file will be displayed here</textarea><br><script type="text/javascript">if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); }else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("test1").value=http://stackoverflow.com/questions/11288330/xmlhttp.responseText; } else { alert('Panel not communicating.Reason: '+xmlhttp.status); } }xmlhttp.open("POST","http://admin:[email protected]/myfile.xml",false);xmlhttp.send();</script></body></html>\[/code\]Anyone know what I am doing wrong?
 
Back
Top