发布到2个不同的文件 [英] Posting to 2 different files
问题描述
我希望任何javascript和asp大师可以帮我解决这个
问题,好吧,这里是....
i有表格,有一个用户和密码,用户输入
,当我想提交此表格时....
i想要将它提交给两个不同的文件。
所以file1.asp会有用户名和密码....而file2.asp会有
用户和密码。
i希望打开两个不同的窗口,如果可能的话。所以用户
可以同时在两个窗口上工作。
窗口1 = file1.asp
窗口2 = file2。 asp
I was hoping any javascript and asp gurus may help me with this
problem, o.k well here it is....
i have a form, which has a user and password, that a user enters
when i want to submit this form....
i would like to submit it to 2 two different files.
so file1.asp would have user and password....and file2.asp would have
user and password.
i would like two different windows to open, if possible. so the user
can work on both windows at once.
window 1 = file1.asp
window 2 = file2.asp
推荐答案
Kavi于2006年4月22日在comp.lang.javascript写了 :
Kavi wrote on 22 apr 2006 in comp.lang.javascript:
我希望任何javascript和asp大师都可以帮我解决这个问题,好吧,这就是....
我有一个表单,有一个用户和密码,用户输入
当我想提交此表格时....
我想将其提交给两个不同的文件。
所以file1.asp会有用户名和密码....而file2.asp会有
用户名和密码。
我想要两个不同的窗口打开, 如果可能的话。所以用户可以同时在两个窗口上工作。
窗口1 = file1.asp
窗口2 = file2.asp
I was hoping any javascript and asp gurus may help me with this
problem, o.k well here it is....
i have a form, which has a user and password, that a user enters
when i want to submit this form....
i would like to submit it to 2 two different files.
so file1.asp would have user and password....and file2.asp would have
user and password.
i would like two different windows to open, if possible. so the user
can work on both windows at once.
window 1 = file1.asp
window 2 = file2.asp
>
[Serverside不了解Windows,或FF标签窗口或弹出窗口。
仅限服务器服务文件输出请求,
因此无法启动第二个文件。]
尝试:
提交给file1 ,
将用户/ pw数据放在[服务器端ASP]会话变量中,
将该文件1由客户端脚本代码打开
a [popup]带文件2的第二个窗口。
完成,除了:
谨防弹出窗口阻止程序和客户端脚本关闭以及
cros-浏览器不兼容。
==============
永远不要给予客户端html或代码的密码。
访问限制应在服务器上处理。
立即工作,在邮件中感觉(!),
对于今天的用户和今天的浏览器是不可能的。
给出键盘和鼠标输入的使用一次只能到一个窗口。
;-)
-
Evertjan。
荷兰。
(请在我的电子邮件地址中将x'变为点数)
[Serverside does not know about windows, or FF tab windows or popups.
Servers only "serve" file output on request,
so cannot initiate a second file.]
Try:
Submit to file1,
put the user/pw data in [serverside ASP] session variables,
have that file1 by clientside script code open
a [popup] second window with file2.
Done, except:
Beware of popup blockers and clientside script switch-off and
cros-browser incompatibilities.
==============
Never "give" a password to clientside html or code.
Restriction of access should be handled on the server.
"work .. at once", in the litteral sense(!),
is impossible for to-day''s users and for to-day''s browsers.
The use of keyboard and mouse input is given to one window at a time.
;-)
--
Evertjan.
The Netherlands.
(Please change the x''es to dots in my emailaddress)
Evertjan。写道:
Evertjan. wrote:
[...]
[Serverside不了解Windows,或FF标签窗口或弹出窗口。
仅服务器服务根据请求输出文件,
因此无法启动第二个文件。]
[...]
[...]
[Serverside does not know about windows, or FF tab windows or popups.
Servers only "serve" file output on request,
so cannot initiate a second file.]
[...]
误解。 Web服务器提供超过1个文件
作为对单个http请求的响应没有问题。这是浏览器可能不支持
支持它。
#!/ usr / bin / perl
print" ; Content-Type:text / html; charset = iso-8859-1 \ nn \ n";
使用CGI qw /:push -nph /;
Misconception. Web servers have no problem to deliver more than 1 file
as a response to a single http request. It''s the browser that may not
support it.
#!/usr/bin/perl
print "Content-Type: text/html; charset=iso-8859-1\n\n";
use CGI qw/:push -nph/;
| = 1;
打印multipart_init(-boundary =>''----这里我们去!'');
foreach(0 .. 4){
打印multipart_start(-type =>''text / plain''),
"当前时间是,标量(本地时间),\ n" ;;
if(
| = 1;
print multipart_init(-boundary=>''----here we go!'');
foreach (0 .. 4) {
print multipart_start(-type=>''text/plain''),
"The current time is ",scalar(localtime),"\n";
if (
这篇关于发布到2个不同的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!