Hi,
ISSUE: I am working on HTML application, an HTML page contains a username, password and Login
button. When i enter the username and password and click Login button, i want to create a text
file and write the username in to the text file on the server side machine.
I have implemented the html page like above issue, but the main problem is when i call the html
page from the server in to the local machine through URL in Internet Explorer. When i enter the
Username and password the .txt file is not created at the server side.
The Page i implemented is like this,
<html>
<title>Mutiara SMART</title>
<SCRIPT language="JavaScript">
function WriteFile()
{
var username = document.getElementById('txtUserName').value;
var Scr = new ActiveXObject("Scripting.FileSystemObject");
var CTF = Scr.CreateTextFile("C:\\DataBuffer", true, true);
CTF.WriteLine(username);
CTF.Close();
}
</SCRIPT>
<head>
<link href="admin.css" rel="stylesheet" type="text/css">
</head>
<body>
<center>
<img src = "smart.jpg">
<table width="350" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="gray" class="entryTable">
<tr id="entryTableHeader">
<td>:: Login ::</td>
</tr>
<tr>
<td class="contentArea">
<table width="100%" border="0" cellpadding="2" cellspacing="1" class="text">
<tr align="center">
<td colspan="3"> </td>
</tr>
<tr class="text">
<td width="100" align="right">Username </td>
<td width="10" align="center">:</td>
<td><input name="txtUserName" type="text" class="box" id="txtUserName" value="" size="30" maxlength="100"></td>
</tr>
<tr>
<td width="100" align="right">Password </td>
<td width="10" align="center">:</td>
<td><input name="txtPassword" type="password" class="box" id="txtPassword" value="" size="30"></td>
</tr>
<tr>
<td colspan="2"> </td>
<td>
<a onClick="javascript: CreateFile();">Login</a> </td>
</tr>
</table>
</center>
</body>
</html>
can anyone give an idea on how to create .txt file on server side.
Thank you in Advance.