473,387 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

count down

Hi all,

I need som advice. I want to display a textbox that displays a countdown
from say 90 minutes is hh:mm:ss format. I also want it to be displayed
consistently on every page of my system as long as the user is in a session
(ie. user session is 90 mins). The problem I think is that the countdown
tends to restart itself everytime the user refreshes the page, or re-loads
the page ie. moving from one page to another.

How do I do this. Should I use a user control to display the countdown timer?

Also is it possible to use the TIMER control to write the countdown ?

TIA
Andrew
Nov 19 '05 #1
3 1314
Andrew,

You need to use a client-side timer. Look at javascript function
window.setInterval(...). To solve problem of restarting the timer every time
when the user moves to another page, consider using iframes. Put the textbox
with the countdown on the top level window and open other pages in a iframe.
In this way the textbox won't be affected by navigating between the pages.

Eliyahu

"Andrew" <An****@discussions.microsoft.com> wrote in message
news:45**********************************@microsof t.com...
Hi all,

I need som advice. I want to display a textbox that displays a countdown
from say 90 minutes is hh:mm:ss format. I also want it to be displayed
consistently on every page of my system as long as the user is in a session (ie. user session is 90 mins). The problem I think is that the countdown
tends to restart itself everytime the user refreshes the page, or re-loads
the page ie. moving from one page to another.

How do I do this. Should I use a user control to display the countdown timer?
Also is it possible to use the TIMER control to write the countdown ?

TIA
Andrew

Nov 19 '05 #2
Thanks for your reply. I have created a frameset which links to a "header"
(top)and "main" (bottom) aspx files.

I have a checkbox control and a label control in the header frame which I
want to access in the main frame. If chkMarked = true, store a value in the
db. The label control displays the question number that is generated in the
main frame.

How can I access that checkbox and label control ? The db code is in the
main frame. Also as each page in the main frame is Page.IsPostBack, how do I
refresh the controls in the header frame ?

TIA.
Andrew.

"Eliyahu Goldin" wrote:
Andrew,

You need to use a client-side timer. Look at javascript function
window.setInterval(...). To solve problem of restarting the timer every time
when the user moves to another page, consider using iframes. Put the textbox
with the countdown on the top level window and open other pages in a iframe.
In this way the textbox won't be affected by navigating between the pages.

Eliyahu

"Andrew" <An****@discussions.microsoft.com> wrote in message
news:45**********************************@microsof t.com...
Hi all,

I need som advice. I want to display a textbox that displays a countdown
from say 90 minutes is hh:mm:ss format. I also want it to be displayed
consistently on every page of my system as long as the user is in a

session
(ie. user session is 90 mins). The problem I think is that the countdown
tends to restart itself everytime the user refreshes the page, or re-loads
the page ie. moving from one page to another.

How do I do this. Should I use a user control to display the countdown

timer?

Also is it possible to use the TIMER control to write the countdown ?

TIA
Andrew


Nov 19 '05 #3
I always use iframes and don't know much about frames. For an iframe, parent
property of the window object gives you a reference to the top-level window.
You can refer to the elements in the parent windows as
parent.document.getElementById("chkMarked"). You can call
parent.myForm.submit() to initiate a postback.

To get more information on using frames, as opposed to iframes, start a
separate thread.

Eliyahu

"Andrew" <An****@discussions.microsoft.com> wrote in message
news:A6**********************************@microsof t.com...
Thanks for your reply. I have created a frameset which links to a "header"
(top)and "main" (bottom) aspx files.

I have a checkbox control and a label control in the header frame which I
want to access in the main frame. If chkMarked = true, store a value in the db. The label control displays the question number that is generated in the main frame.

How can I access that checkbox and label control ? The db code is in the
main frame. Also as each page in the main frame is Page.IsPostBack, how do I refresh the controls in the header frame ?

TIA.
Andrew.

"Eliyahu Goldin" wrote:
Andrew,

You need to use a client-side timer. Look at javascript function
window.setInterval(...). To solve problem of restarting the timer every time when the user moves to another page, consider using iframes. Put the textbox with the countdown on the top level window and open other pages in a iframe. In this way the textbox won't be affected by navigating between the pages.
Eliyahu

"Andrew" <An****@discussions.microsoft.com> wrote in message
news:45**********************************@microsof t.com...
Hi all,

I need som advice. I want to display a textbox that displays a countdown from say 90 minutes is hh:mm:ss format. I also want it to be displayed
consistently on every page of my system as long as the user is in a

session
(ie. user session is 90 mins). The problem I think is that the countdown tends to restart itself everytime the user refreshes the page, or re-loads the page ie. moving from one page to another.

How do I do this. Should I use a user control to display the countdown

timer?

Also is it possible to use the TIMER control to write the countdown ?

TIA
Andrew


Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: phil | last post by:
Using Tkinter Canvas to teach High School Geometry with A LOT of success. My drawing gets very slow after a lot of actions. For instance I have created code to rotate a set of objects about a...
4
by: Matthew Groch | last post by:
Hi all, I've got a server that handles a relatively high number of concurrent transactions (on the magnitude of 1000's per second). Client applications establish socket connections with the...
2
by: james | last post by:
I have been looking for a way to reproduce the tooltip that Access displays when scrolling the Datagrid that shows the record count (changes as you move the thumb up or down). So far, nothing I...
68
by: Martin Joergensen | last post by:
Hi, I have some files which has the following content: 0 0 0 0 0 0 0 1 1 1 1 0 0 1 1 1 1 0 0 1 1 1 1 0 0 1 1 1 1 0 0 0 0 0 0 0
2
by: Volkan | last post by:
Hi, I'm trying to compare two XML documents and i'm using XPath queries to select nodes. XPathNavigator's Select method runs fast enough and returns an XPathNodeIterator object. When i try to...
2
by: HeroinNO.4 | last post by:
Copy the code below and save in a .htm file, for example : 1.htm, then run it in browser, you'll see a cool count down timer ! If it doesn't work, you may open http://www.fillweb.com in IE and...
1
by: HeroinNO.4 | last post by:
You can open http://www.fillweb.com in IE and View->Source to see the latest version full featured count down timer source code, or you may also copy the code below and save in a "*.htm" file, for...
2
by: HeroinNO.4 | last post by:
Hello everyone! Now the latest version of free count down timer source code is available in http://www.fillweb.com/countdown.htm, you can open it in IE and View->Source to see the latest version...
7
by: HeroinNO.4 | last post by:
Hello guys, free count down timer source code has updated to 06/11/27, you can copy the code below and save in a ".htm" file and run it in a browser support javascript 1.1 or later, or you can open...
0
by: mike0870 | last post by:
Hi, I've been at this one for hours and cannot not find any posts of anyone having the same problem. Ther scenario is, I need to fill a drop down box with a value in the grid row to pass to the...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
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...

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.