Solved

I need to display a timer for an examination on my web page. Using VB.NET.

Posted on 2004-09-29
4
163 Views
Last Modified: 2010-04-25
I need to display a timer for an examination on my web page. Using VB.NET.

Can this be done easily?

Kind Regards

PG

0
Comment
Question by:pgilfeather
  • 2
4 Comments
 
LVL 14

Expert Comment

by:dfu23
ID: 12180470
I would suggest using javascript .... what do you need to do?

A countdown?

Or show the current time?
0
 

Author Comment

by:pgilfeather
ID: 12180535
I need a countdown.

I have two problems...I have never really used javascript and I need to respond to the event of the counter getting to zero.

If you could talk me through how to do this I would be very thankful as I have a very tight deadline.

Kind Regards

PG
0
 
LVL 14

Expert Comment

by:dfu23
ID: 12180617
Ok, I've responding to this question here and in the VB.NET topic area ... take a look at my post over there ... it shows the general idea to start in Javascript
0
 
LVL 23

Accepted Solution

by:
adilkhan earned 500 total points
ID: 12183756
OK here is a Basic Example. Simply Copy Paste and save it as a HTML file to see it in Action.
once understood integerate it with your PAGE (by copying Counter() Function and calling it within BODY tag)

Good Luck.



<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>

<script>
var Duration;
Duration = 60; // 1 hours(60 Minutes)

function Counter() {

      var frm = document.f1.t1
      
      if(Duration >= 0) {
            frm.value = Duration;
            Duration--;
            
            T = setTimeout("Counter()", 1000*60)
      } else {
          
            alert("Session Expired")
            // or you can redirect to a different page by placing this line  document.location = "page_name.html"
            return false
      }
}

</script>
</head>

<body onload="return Counter()">

<form method="POST" name="f1">
      <p><input type="text" name="t1" size="20"></p>
</form>

</body>

</html>
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to swtich to classic mode in Adobe Dreamweaver CC? 5 3,219
div id bookmark tag not working in Firefox 15 559
Edit Muse Website with Dreamweaver 6 988
Semi-transparent PNG 5 136
For those who don't know, Adobe Dreamweaver is a popular commercial web editor that enables you to design, build and manage complex websites. The editor is a WYSIWYG (What You See Is What You Get) web editor, which means that you can create your web…
This article is very specific and is only intended to help if you are installing Dreamweaver 8 in a Windows 7 environment with Office 2007 installed.   I'm not sure why Microsoft tends to release OS' that should not be released but they do.  Windows…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now