473,976 Members | 6,434 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Asp Countdown for 10 seconds then display form

1 New Member
Im trying to make my site more secure and to stop spammers..


in my <div> I have a form with textboxes.

I want to do this.

I want it to countdown for 10 seconds, and then when the countdown reaches zero, show the form which was hidden.

I do not know how to do this and any help would be appreciated =]
Apr 27 '07 #1
1 3448
elmemo
30 New Member
hi,

what you can do is have the "onload" attribute of your html body element call a javascript function that would getElementById( ) the div of yours where you want your "hidden" form displayed. When it fires, your function would alter the "innerHTML" of the div, and write the html form to it. Here's an example of a javascript function that will alter a div with an id of "pantalla" and have it write "hello world" with the word "world" in bold font:

Expand|Select|Wrap|Line Numbers
  1.     function showContent () {
  2.        document.getElementById('pantalla').innerHTML = "hello \
  3.                                                      <span style='font-weight:bold;'>  world\
  4.                                                      </span>"
  5.      }
  6.  
I don't think you really need the timeout as showing the form contents needs a browser to have javascript anyway, but if you want you can call setTimeOut from the onload attribute in your body element.

If what you fear is somebody being able to submit to the forms many times in a row this won't work, because a person could figure out what the form will look like after the script, and use curl to submit the form time after time. If this is what you fear, what you really need is TURING PROTECTION. google for that there are ready made controls you can use, or just plain use system.drawing to generate an image and output the resulting image (that presumably only humans can interpret) in the page_load event of an aspx page, then use that page's url as the src attribute of an image.

Maybe this is not what you are looking for. If you actually want to delay the content delivery of the form, you could use a delay function at page load, or control delivery of the html with the response.write and response.flush methods
Apr 27 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
2703
by: Bonnett | last post by:
I have been creating a generic countdown timer (source code below), counting the seconds, minutes, hours and days till an event, but I have having trouble with it finding out how many hours are left. When i get it to display a complete countdown (days hours mins seconds left) it is one hour short when counting dates that fall in the following time brackets: 2004,2,29 -> 2004,9,31 2005,2,28 -> 2005,9,30 2006,2,27 -> 2006,9,29 etc..
4
4424
by: Christine | last post by:
I've implemented a countdown timer for a tutorial web page that should give the user 45 minutes to complete the test, only to find that the timer is slowly 'losing' time. On average, it actually takes an extra 35 seconds, but has taken an extra 2.5 minutes in some cases. Any ideas what might be the cause? And more importantly - the fix? Code snippet below... Thanks, Christine
8
3803
by: Michael | last post by:
I have this script that works the way I want except for one thing... Once it hits zero it starts to count up and looks like this: -1:0-1:0-1:0-18 with the last number counting up. Can anyone help me find a way to stop it at zero? Thank you, Mike
31
14216
by: Stephanie | last post by:
I have a newbie question (couldn't find the answer with google) How to show countdown from 10 to 0 seconds. Stephanie
1
29642
by: Will | last post by:
I have form showing instructions and logging actions and I would like the form to show a count down timer for a certain period of time. E.g. 30 secs, going down to 0 and then displaying the action. I want the user to be able to see the seconds counting down. Can anyone help me? thanks
1
2182
by: Dirk Hagemann | last post by:
Hi! I'd like to implement a countdown timer on a webite. It should show the months, days, hours, minutes and seconds until a given date and time. So far it's not really difficult, but this website will be used from different time zones, what will make a difference of 10 hours, if I use the time-information from the client. The event will take place at one fixed moment which is worldwide the same. Does anyone know a way to solve this...
9
2337
by: Yet Another One | last post by:
Sorry if this has been answered before, but I simply cannot find the solution on my own. I am looking to do a countdown in my application. Basically, I need to count down from 5:59 (5 minutes, 59 seconds) and then perform a task. Performing the task is easy enough, but the countdown is just slipping past me. Anyone have any idea how I can best achieve this?
1
3685
by: DennyLoi | last post by:
Hi everyone. I am trying to implement a countdown timer which is displayed on my page. The counter needs to countdown from 10 seconds to 0 upon the page loading up. I tried the following, but am running into difficulties. //Some other script here^^^^ var counterForm = document.createElement("form"); counterForm.name = "form";
9
3896
by: MC | last post by:
I would like to display a timer in the corner of the page that shows the user how many minutes:seconds till the session times out. Are there any good examples out there? Google has again failed me ;) MC
0
10355
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10171
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11408
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
11573
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10908
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7604
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
5153
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4731
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3761
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.