problem replacing text area on asp file
Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Rich Text Editor (RTE)
Forum Description: Support forum for the Web Wiz Rich Text Editor (RTE).
URL: https://forums.webwiz.net/forum_posts.asp?TID=16919
Printed Date: 29 March 2026 at 12:51am Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com
Topic: problem replacing text area on asp file
Posted By: JasonsLan
Subject: problem replacing text area on asp file
Date Posted: 16 October 2005 at 1:41am
I'm trying to replace the text area in an asp file (pasted below)
but for some reason following the directions doesnt seem to work
the rte is in a folder called "rte" which is a sub folder of the folder that the "edit.asp" script is in.
can anybody tell me what code I need to insert?
Thanks a ton in advance
--Jason
-------------------------
<html>
<head>
<title>View Source</title>
</head>
<body>
<div align="center">
<center>
<table border="0" width="84%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" colspan="2">
<form name=edit action="save.asp" method="post">
<textarea rows='15' cols='81' name='file'>
<%
f=request("f")
chkasp = instr(lcase(f), ".asp")
chkhtm = instr(lcase(f), ".htm")
chkhtml = instr(lcase(f), ".html")
chktxt = instr(lcase(f), ".txt")
chktxt = instr(lcase(f), ".php")
if chkasp > 0 or chktxt > 0 or chkhtm > 0 or chkhtml > 0 then
d=request("d")
aa = d & "\" & f
aa = replace(aa, "\\", "\")
MYPath = server.MapPath(aa)
Set Fconn = server.CreateObject("Scripting.FileSystemObject")
Set file = Fconn.OpenTextFile(MYPath,1,false)
output = file.readall
file.close
Set file = nothing
Set Fconn = nothing
Response.Write output
else
response.write "Show only .txt or .asp or. htm or .html or .php files"
end if
%>
</textarea>
</td>
</tr>
<tr>
<td width="100%" colspan="2">
<%
response.write "<input type='hidden' name='d' value='" & request("d") & "'>"
response.write "<input type='hidden' name='MYPath' value='" & MYPath & "'>"
%>
<input type="submit" value="Save"></form>
</td>
</tr>
</table>
</center>
</div>
</body>
</html>
|
Replies:
Posted By: JasonsLan
Date Posted: 17 October 2005 at 10:36am
nevermind, learned that in the documentation the author specified form
name not ID, (its the little things that make all the difference)
Thanks anyways!
|
|