我希望简单的问题! [英] Simple question I hope!

查看:58
本文介绍了我希望简单的问题!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想写一个表单,当用户按下提交时,它会执行

提交操作,然后关闭浏览器或重定向到另一个页面。 br />

CGI我正在使用的形式,恶魔'不允许这样,默认页面和

消息是,好吧,垃圾!


可以这样做吗?


谢谢


Adrian

Hi
I want to write a form that when a user presses submit it carries out the
submit action and then closes the browser or redirects to another page.

The form CGI I''m using, Demon''s does not allow this and the default page and
message is , well, crap!

Can this be done?

Thanks

Adrian

推荐答案

是的,它可以是:


第一部分


<!--- test.html --->

< html>

< head>

< title>测试< / title>

< / head>

< body>

< form name =" adrianFrm" action =" /cgi-bin/myscript.cgi" method =" post">

< input type =" submit" value =" Send">

< / form>

< / body>

< / html>


第二部分


<!--- mysqcript.cgi --->

<! - - 确保你的脚本输出以下内容--->

< html>

< head>

< title> Test< ; / title>

< meta name =" http-equiv" content =" 0; url = http://www.mysite.com/">

< / head>

< body>

< p>点击此处< a href =" http://www.mysite.com/">继续< / a>< / p>

< / body>

< / html>


Adrian写道:
Yes, it can be:

Part I

<!--- test.html --->
<html>
<head>
<title>Test</title>
</head>
<body>
<form name="adrianFrm" action ="/cgi-bin/myscript.cgi" method = "post">
<input type = "submit" value = "Send">
</form>
</body>
</html>

Part II

<!--- mysqcript.cgi --->
<!--- make sure your script outputs the following --->
<html>
<head>
<title>Test</title>
<meta name = "http-equiv" content = "0;url=http://www.mysite.com/">
</head>
<body>
<p>Click here to <a href = "http://www.mysite.com/">continue</a></p>
</body>
</html>

Adrian wrote:

我想要写一个表格,当用户按下提交时,它执行
提交操作,然后关闭浏览器或重定向到另一个页面。

表格CGI我正在使用,恶魔'' s不允许这样,默认页面和
消息就是废话!

这可以吗?

谢谢
Adrian
Hi
I want to write a form that when a user presses submit it carries out the
submit action and then closes the browser or redirects to another page.

The form CGI I''m using, Demon''s does not allow this and the default page and
message is , well, crap!

Can this be done?

Thanks

Adrian






您好

谢谢,但是我的isp提供了一个预设的脚本我不能只修改

电话,所以我正试图在页面内的JS中做到这一点!


Adrian


" orlando echevarria" <或***** @ engr.uconn.edu>在留言中写道

新闻:3F ************** @ engr.uconn.edu ...
Hi
Thanks, but I my isp provide a preset script that I can''t modify only
call, so I''m trying to do it from JS within the page!

Adrian

"orlando echevarria" <or*****@engr.uconn.edu> wrote in message
news:3F**************@engr.uconn.edu...
是的,它可以是:

第一部分

<!--- test.html --->
< html>
< head> < br&>< title>测试< / title>
< / head>
< body>
< form name =" adrianFrm" action =" /cgi-bin/myscript.cgi" method =" post">
< input type =" submit" value =" Send">
< / form>
< / body>
< / html>

第二部分

<!--- mysqcript.cgi --->
<!---确保您的脚本输出以下内容--->
< html>
< head>
< title>测试< / title>
< meta name =" http-equiv" content =" 0; url = http://www.mysite.com/">
< / head>
< body>
< p>点击此处< a href =" http://www.mysite.com/">继续< / a>< / p>
< / body>
< / html>

Adrian写道:
Yes, it can be:

Part I

<!--- test.html --->
<html>
<head>
<title>Test</title>
</head>
<body>
<form name="adrianFrm" action ="/cgi-bin/myscript.cgi" method = "post">
<input type = "submit" value = "Send">
</form>
</body>
</html>

Part II

<!--- mysqcript.cgi --->
<!--- make sure your script outputs the following --->
<html>
<head>
<title>Test</title>
<meta name = "http-equiv" content = "0;url=http://www.mysite.com/">
</head>
<body>
<p>Click here to <a href = "http://www.mysite.com/">continue</a></p>
</body>
</html>

Adrian wrote:

我想写一个表单,当用户按下提交时,它执行
提交操作,然后关闭浏览器或者重定向到另一个页面。

CGI我正在使用的形式,恶魔'不允许这个和默认页面
和消息,好吧,废话!

这可以吗?

Adrian
Hi
I want to write a form that when a user presses submit it carries out the submit action and then closes the browser or redirects to another page.

The form CGI I''m using, Demon''s does not allow this and the default page and message is , well, crap!

Can this be done?

Thanks

Adrian



我想写一个表单,当用户按下提交时,它执行
提交操作,然后关闭浏览器或重定向到另一个页面。
I want to write a form that when a user presses submit it carries out the
submit action and then closes the browser or redirects to another page.




如果我理解正确,那么你需要表格程序要在页面本地完成

,而不是在服务器上?


如果是这样的......好吧......有可能写一个javascript函数''验证''

表单并执行几乎所有''本地''信息操作...

但是,通常表格为有什么用它需要把它的数据发送到服务器的



如果你想做的就是以一种奇特的方式重写表格,以便它看起来很好,你可以做到这一点,仍然将表单数据提交给cgi脚本。

然而,在提交后让它重定向到另一个页面是另一个

问题......我很确定你无法改变那种行为,因为在处理cgi脚本时,它的输出会直接发送到浏览器。所以

除非你能修改cgi脚本,否则你会陷入困境。除非有一个

参数,否则你可以传递给cgi脚本,它会将它重定向到某个地方。

这是值得怀疑的。


HTH。


P.



If I understand you correctly, then you want the form processing to be done
on the page locally, rather than on the server?

If so... well... It is possible to write a javascript function to ''validate''
the form and perform pretty much any ''local'' operations of the info...
However, usually for a form to be of any use it needs to send its data to
the server.

If all you want to do is rewrite the form in a fancy way so that it looks
nice, you can do that and still submit the form data to the cgi script.
However, getting it to redirect to another page after submission is another
matter... I''m pretty sure that you cannot change that behaviour, as upon
processing the cgi script, its output is sent to the browser directly. So
unless you can modify the cgi script, you''re stuck. Unless there is a
parameter you can pass to the cgi script that will redirect it somewhere.
Which is doubtful.

HTH.

P.


这篇关于我希望简单的问题!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆