Hi All,
I have this code that works if the page is a HTM page. I am trying to convert it to work as an asp page. The page contains the readparams() Javascript line - which I can't run in asp (I am guessing).
Is there any way I can achieve the same in asp, without having to manually enter all of the form field for every form page created?
Thanks in advance.
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Thank you for your submission</title>
</head>
<body onload="readparms()" bgcolor="#FFFFFF">
<center>
<p>
</p>
<h1> </h1>
<h1><font color="#FF0000" size="+3"><strong>Document Submitted For Print </strong></font></h1>
</center>
<script language="javascript">
function readparms()
{
writevalues(unescape(document.location.toString()));
}
</script>
<script language="vbscript">
sub writevalues(mystr)
Dim filesys, demofile, mypos, x
Set filesys = CreateObject("Scripting.FileSystemObject")
set demofile = filesys.CreateTextFile("D:\results.txt")
mystr = replace(mystr,"+"," ")
mypos = instr(mystr,"?")
for x=mypos+1 to len(mystr)
if mid(mystr,x,1)="&" then
demofile.WriteLine
else
demofile.Write mid(mystr,x,1)
end if
next
demofile.WriteLine
demofile.Close
end sub
</script>
<p align="center"><font face="Tahoma" size="2">
<a href="javascript:history.go(-1)">Back to previous page</a></font></p>
</body>
</html>
I have this code that works if the page is a HTM page. I am trying to convert it to work as an asp page. The page contains the readparams() Javascript line - which I can't run in asp (I am guessing).
Is there any way I can achieve the same in asp, without having to manually enter all of the form field for every form page created?
Thanks in advance.
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Thank you for your submission</title>
</head>
<body onload="readparms()" bgcolor="#FFFFFF">
<center>
<p>
</p>
<h1> </h1>
<h1><font color="#FF0000" size="+3"><strong>Document Submitted For Print </strong></font></h1>
</center>
<script language="javascript">
function readparms()
{
writevalues(unescape(document.location.toString()));
}
</script>
<script language="vbscript">
sub writevalues(mystr)
Dim filesys, demofile, mypos, x
Set filesys = CreateObject("Scripting.FileSystemObject")
set demofile = filesys.CreateTextFile("D:\results.txt")
mystr = replace(mystr,"+"," ")
mypos = instr(mystr,"?")
for x=mypos+1 to len(mystr)
if mid(mystr,x,1)="&" then
demofile.WriteLine
else
demofile.Write mid(mystr,x,1)
end if
next
demofile.WriteLine
demofile.Close
end sub
</script>
<p align="center"><font face="Tahoma" size="2">
<a href="javascript:history.go(-1)">Back to previous page</a></font></p>
</body>
</html>