How to do the page automatically refresh, without letting users press ENTER to submit data!

Source: Internet
Author: User
How to do the page automatically refresh, without letting users press ENTER to submit data!
(01-3-30 240)
"Doug" was posted at Joy asp↑ in 2001-3-22 15:49:42:
Suppose the following form is in the leaf:
<form name=inputdate>
...
</form>
If the page is to be refreshed automatically, but the page has Request.Form, a prompt box will usually appear, requiring the user to make sure to submit the data, which is not automatic
Refreshed. For monitoring or stock display, it is important not to interfere with the user, the following can solve the problem:
<script language= "JavaScript" >
<!--
var limit= "0:60"//Definition Refresh Time
if (document.images) {
var parselimit=limit.split (":")
Parselimit=parselimit[0]*60+parselimit[1]*1
}
function Beginrefresh () {
if (!document.images) return;
if (parselimit==1) {
Inputdate.action= "typealert.asp"; Here is the name of the page, do not forget that there should be a form outside, with hidden space to retain the Request.Form data required for this page!
Inputdate.submit ()
} else{
Parselimit-=1
Curmin=math.floor (PARSELIMIT/60)
Cursec=parselimit%60
if (curmin!=0)
curtime=curmin+ "+cursec+" seconds after the brush this page! "
Else
curtime=cursec+ "Seconds later to brush this page!" "
Window.status=curtime
SetTimeout ("Beginrefresh ()", 1000)
}
}
Window.onload=beginrefresh
-->
</Script>
This part is to be added to <HEAD>!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.