Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem saving xml file

Status
Not open for further replies.

alexbo

Programmer
Jul 26, 2002
20
IT
Hi
I have the following problem, I have to write an XML file and this is the code:

<script language=javascript>
function Write()
{
if (document.getElementById("Number").value.length==0)
{
alert('Inserire il numero della sessione')
document.getElementById("Number").focus()
return;
}
xmlDoc = new ActiveXObject( "Microsoft.XMLDOM" );
root = xmlDoc.createElement("Sessione")
xmlDoc.appendChild(root)
child1 = xmlDoc.createElement("Id")
child1.text=document.getElementById("Number").value;
root.appendChild(child1)
p=xmlDoc.createProcessingInstruction("xml","version='1.0'")
xmlDoc.insertBefore(p,root)
xmlDoc.save("Sessione.xml")
}
On my computer it works fine, when I try to access it from the web, published with a physical address, it gives me anouthorize access, Is there a way to know the user that is running the script, so I can giv him access? Or is there another solution?
Any Idea bye Alex...
 
Maybe I didn't explain myself, If i access the page from the drive example c:\MyFolder\mypage.htm it works fine, if I access it from it gives me Unauthorize access and in IIS c:\Myfolder is linked to in the istruction xmlDoc.save("Sessione.xml"). what kind of Authorization do I have to give and to which user? bye Alex
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top