javascript计时器到cgi [英] javascript timer to cgi

查看:155
本文介绍了javascript计时器到cgi的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,我想知道是否有一种方法让javacript是

由一个输入按钮激活,该按钮会调用cgi程序和每隔10分钟
querey并且cgi会在没有额外用户交互的情况下更新页面。我在js中找到了一些计时器的东西,但它有延迟而不是我真正想要的
。谢谢

高级。

Hello, I was wondering if there was a way to have a javacript be
activated by an input button that would call to a cgi program and
querey every 10minutes and the cgi would update the page without
additional user interaction. I found some timer stuff in js but it had
to do with delays and not what I was really looking for. Thank you in
advanced.

推荐答案

jason_box于05 mei 2006写于comp.lang.javascript
jason_box wrote on 05 mei 2006 in comp.lang.javascript:
您好,我想知道是否有办法通过调用cgi的输入按钮激活javacript
程序和每隔10分钟就会有一次,并且cgi会更新页面,而无需额外的用户交互。我在js中找到了一些计时器的东西,但它有延迟而不是我真正想要的东西。


但....


CGI适用于服务器,更新页面由客户端完成。


CGI程序无法按下客户端按钮,因此用户必须每隔10分钟按b
$

你在哪里?想要运行javascript吗?


在客户端浏览器上,还是在服务器上[在ASP下]?


有什么区别?和延迟?

先谢谢你。
Hello, I was wondering if there was a way to have a javacript be
activated by an input button that would call to a cgi program and
querey every 10minutes and the cgi would update the page without
additional user interaction. I found some timer stuff in js but it had
to do with delays and not what I was really looking for.
But ....

CGI works on the server, and updating a page is done by the client.

The CGI programme cannot press a clientside button, so the user has to
presss it every 10 minutes?

Where do you want the javascript to run?

On the client browser, or on the server [under ASP]?

What is the difference between waiting and a delay?
Thank you in advanced.




我希望不是那么先进。


-

Evertjan。

荷兰。

(请在我的电子邮件地址中将x'变为点数)



Not that advanced I hope.

--
Evertjan.
The Netherlands.
(Please change the x''es to dots in my emailaddress)


您好,感谢您的快速回复。如果我的问题有点混乱,我应该澄清一下自己。 cgi脚本只是调用本地

服务器从服务器输出一些数据。在html

页面上,我想要一个可以激活的javascript并调用cgi

程序并每5-10分钟调用一次cgi。 cgi已经

将数据输出到主html页面,但我希望当用户想要数据时它只是活跃的
。由于我不想从服务器请求

,因此javascript应该只调用cgi每个

10分钟,直到用户按下停止按钮为止/>
javascript停止。我认为这可以通过on()和off()

函数来完成,但我还不知道如何做到这一点。 javascript将是

通过客户端运行,所以当然需要一些

的互动。我希望这可以解决任何困惑。再次感谢你。

Evertjan。写道:
Hello, Thank you for your quick response. I should clarify myself if my
question was a little confusion. The cgi script just calls to a local
server to output some data from the server which works. On the html
page I wanted a javascript that would be activiated and call the cgi
program and call to the cgi every 5-10minutes. The cgi will already
outputs the data to the main html page but I would like it to be only
active when a user wants the data. Since I do not want to over request
from the server, the javascript should just call to the cgi every
10minutes until the user press a stop button whcih cuases the
javascript to stop. I think this can be done with on() and off()
functions but I was not sure how to do this yet. The javascript will be
ran through the client side so of course it will require some
interaction. I hope this clears up any confusion. Thank you again.
Evertjan. wrote:
jason_box写于05 mei 2006 comp.lang.javascript
jason_box wrote on 05 mei 2006 in comp.lang.javascript:
你好,我想知道是否有通过一个输入按钮激活javacript的方法,该按钮每隔10分钟调用一次cgi程序和一个querey,而cgi会更新页面而不需要额外的用户交互。我在js中发现了一些计时器的东西,但是它有延迟而不是我真正想要的东西。
Hello, I was wondering if there was a way to have a javacript be
activated by an input button that would call to a cgi program and
querey every 10minutes and the cgi would update the page without
additional user interaction. I found some timer stuff in js but it had
to do with delays and not what I was really looking for.



但....

CGI在服务器上运行,更新页面由客户端完成。

CGI程序无法按下客户端按钮,因此用户必须每隔10分钟按一次?

你想在哪里运行javascript?

在客户端浏览器上,或在服务器上[在ASP下]?

什么是等待和延迟之间的区别?



But ....

CGI works on the server, and updating a page is done by the client.

The CGI programme cannot press a clientside button, so the user has to
presss it every 10 minutes?

Where do you want the javascript to run?

On the client browser, or on the server [under ASP]?

What is the difference between waiting and a delay?

先谢谢你。



我希望不是那么先进。

-
Evertjan。
荷兰。
(请在我的电子邮件地址中将x'变为点数)



Not that advanced I hope.

--
Evertjan.
The Netherlands.
(Please change the x''es to dots in my emailaddress)






jason_box在05 mei 2006上写了comp.lang.javascript
jason_box wrote on 05 mei 2006 in comp.lang.javascript:
您好,感谢您的快速回复。如果我的问题有点混乱,我应该澄清一下自己。 cgi脚本只是调用本地服务器从服务器输出一些数据。在html
页面上,我想要一个可以激活的javascript并调用cgi
程序并每隔5-10分钟调用一次cgi。 cgi已经将数据输出到主html页面,但我希望它只在用户想要数据时才有效。由于我不想从服务器请求
,因此javascript应该每隔10分钟调用一次cgi,直到用户按下停止按钮,这样才能停止。我认为这可以通过on()和off()
函数完成,但我还不知道如何做到这一点。 javascript将通过客户端运行,因此当然需要一些
交互。我希望这可以解决任何困惑。再次感谢你。
Hello, Thank you for your quick response. I should clarify myself if my
question was a little confusion. The cgi script just calls to a local
server to output some data from the server which works. On the html
page I wanted a javascript that would be activiated and call the cgi
program and call to the cgi every 5-10minutes. The cgi will already
outputs the data to the main html page but I would like it to be only
active when a user wants the data. Since I do not want to over request
from the server, the javascript should just call to the cgi every
10minutes until the user press a stop button whcih cuases the
javascript to stop. I think this can be done with on() and off()
functions but I was not sure how to do this yet. The javascript will be
ran through the client side so of course it will require some
interaction. I hope this clears up any confusion. Thank you again.




[请不要在usenet上使用]

< button

onclick =' 'var tmt = setInterval(" doCallServer()",10 * 60 * 1000)''>

start< / button>


< ; button onclick =''clearInterval(tmt)''>

stop< / button>

-

Evertjan。

荷兰。

(请将我的电子邮件地址中的x'变为点数)



[please do not toppost on usenet]
<button
onclick=''var tmt = setInterval("doCallServer()",10*60*1000)''>
start</button>

<button onclick=''clearInterval(tmt)''>
stop</button>
--
Evertjan.
The Netherlands.
(Please change the x''es to dots in my emailaddress)


这篇关于javascript计时器到cgi的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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