当从选择列表中选择文件时,如何将文件中的文本放入textarea框中!

问题描述:

大家好,


希望有人可以在这里提供帮助!!


我将标准邮件页放在一起,这将是允许我的用户

发送给他人的电子邮件。这些文件存储在文本

文件中。我已经想出了一个脚本来将名字产生到一个

选择列表,但是我知道我想让它们被读入一个textarea盒子,

允许我将它们从表单提交到sendmail.asp

页面!但是我可以把它们传递出来的唯一方法就是进入iframe,

似乎不允许我将它们传递到sendmail.asp页面

发送。


任何帮助?


干杯

Shaiboy
SH ************** @ NOSPAMyahoo.co.uk

Hi All,

Hope someone can help here!!

I''m putting a standard mail page together, that will allow my users to
sent templete emails out to people. The files are stored in text
files. I have come up with a script to produce the names into a
Select list, but know i''m wanting them to be read into a textarea box,
to allow me to submit them into from the form into the sendmail.asp
page! but the only way i can pass them out, is into a iframe, which
doesn''t seem to allow me to then pass them into the sendmail.asp page
for sending.

Anyone help?

Cheers
Shaiboy
sh**************@NOSPAMyahoo.co.uk

服务器上的文件是什么?


这是一个页面回发的简单方法对于它自己,并且在名为file1.txt和file2.txt的服务器上的同一目录中有两个文件。


<%

Dim sFile

sFile = Request.Form(" cboFile")

%>


&lt ; body>

< form method =" post" action =" self.asp">

< select name =" cboFile" onchange =" this.form.submit();">

< option value =" file1.txt"<%if sFile =" file1.txt"然后Response.Write

selected ="" selected""">>              " file2.txt"<%If sFile =" file2.txt"然后Response.Write

selected ="" selected""">>             

< textarea><%if sFile<> &QUOT;&QUOT;然后Server.Execute sFile%>< / textarea>

< input type =" submit" />

< / form>


雷在工作


" Shaiboy_UK" &LT; SH ******** @ yahoo.co.uk&GT;在消息中写道

新闻:2d ************************** @ posting.google.c om ...
Are the files on the server?

Here''s a simple method where the page posts back to itself, and there are
two files in the same directory on the server named file1.txt and file2.txt.

<%
Dim sFile
sFile = Request.Form("cboFile")
%>

<body>
<form method="post" action="self.asp">
<select name="cboFile" onchange="this.form.submit();">
<option value="file1.txt"<% If sFile = "file1.txt" Then Response.Write "
selected=""selected"""%>>File 1</option>
<option value="file2.txt"<% If sFile = "file2.txt" Then Response.Write "
selected=""selected"""%>>File 2</option>
</select>
<textarea><%If sFile <> "" Then Server.Execute sFile%></textarea>
<input type="submit" />
</form>

Ray at work

"Shaiboy_UK" <sh********@yahoo.co.uk> wrote in message
news:2d**************************@posting.google.c om...
大家好,

希望有人可以在这里帮忙!!

我正在将标准邮件页放在一起,这将允许我的用户发送寺庙电子邮件给人们。文件存储在文本
文件中。我已经想出了一个脚本来将名称生成到一个
选择列表中,但是我知道我想让它们被读入一个textarea框,
允许我从表单中提交它们进入sendmail.asp
页面!但是我可以把它们传递出来的唯一方法就是进入iframe,这似乎不允许我将它们传递到sendmail.asp页面来发送。

干杯
Shaiboy
sh ************** @ NOSPAMyahoo.co.uk



" Ray Costanzo [MVP]" <我的第34号商业广告的名字>写在

消息新闻:Ol **************** @ TK2MSFTNGP09.phx.gbl ...
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:Ol****************@TK2MSFTNGP09.phx.gbl...
是文件在服务器上?

这是一个简单的方法,页面发布回自身,并且在名为file1.txt和
file2.txt。

<%
Dim sFile
sFile = Request.Form(" cboFile")
%>

< body>
< form method =" post" action =" self.asp">
< select name =" cboFile" onchange =" this.form.submit();">
< option value =" file1.txt"<%If sFile =" file1.txt"然后Response.Write
"
selected ="" selected""""">>>< / option>>< option value =" file2。 txt"<%If sFile =" file2.txt"然后Response.Write
"
selected ="" selected""""">>< />>< / select>
< / select>
< textarea><%if sFile<> &QUOT;&QUOT;然后Server.Execute sFile%>< / textarea>
< input type =" submit" />
< / form>

Ray在工作
Are the files on the server?

Here''s a simple method where the page posts back to itself, and there are
two files in the same directory on the server named file1.txt and
file2.txt.

<%
Dim sFile
sFile = Request.Form("cboFile")
%>

<body>
<form method="post" action="self.asp">
<select name="cboFile" onchange="this.form.submit();">
<option value="file1.txt"<% If sFile = "file1.txt" Then Response.Write
"
selected=""selected"""%>>File 1</option>
<option value="file2.txt"<% If sFile = "file2.txt" Then Response.Write
"
selected=""selected"""%>>File 2</option>
</select>
<textarea><%If sFile <> "" Then Server.Execute sFile%></textarea>
<input type="submit" />
</form>

Ray at work




你好Ray,


试过并且不起作用,脚本在:
http://www.theukserver.net/testscript/test2.asp

文件全部列在 http://www.theukserver.net/testscript/


告诉我们


干杯

Shaiboy
sh * *************@NOSPAMyahoo.co.uk



Hi Ray,

Tried and doesn''t work, script at:
http://www.theukserver.net/testscript/test2.asp
files all listed at http://www.theukserver.net/testscript/

Let me know

Cheers
Shaiboy
sh**************@NOSPAMyahoo.co.uk


什么不起作用关于它?一件事你没有在

下拉列表中列出任何文件名。此外,表格不会回复自己。


雷在工作


" Shaiboy_UK" &LT; SH ************** @ NOSPAMyahoo.co.uk&GT;在消息中写道

新闻:QZ ****************** @ fe1.news.blueyonder.co.u k ...
What "doesn''t work" about it? You don''t have any file names listed in the
dropdown for one thing. Also, the form does not post back to itself.

Ray at work

"Shaiboy_UK" <sh**************@NOSPAMyahoo.co.uk> wrote in message
news:QZ******************@fe1.news.blueyonder.co.u k...


试过并且不起作用,脚本在:
http://www.theukserver.net/testscript/test2.asp
文件全部列在 http://www.theukserver.net/testscript/

告诉我

干杯
Shaiboy
sh ********* *****@NOSPAMyahoo.co.uk


Tried and doesn''t work, script at:
http://www.theukserver.net/testscript/test2.asp
files all listed at http://www.theukserver.net/testscript/

Let me know

Cheers
Shaiboy
sh**************@NOSPAMyahoo.co.uk