473,395 Members | 1,530 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,395 software developers and data experts.

Auto Close Dialogue Box & Redirect

I'm setting up a system in small museum where a number of web sites will be run locally on a PC with a touchscreen running (I assume) Windows & IE7.

I need every page to have a timed redirect to the homepage, so that when a visitor leaves, everything will reset, ready for the next person. Which I can do OK with Javascript.

I'd like to be able to warn people however, that the redirect is imminent. Some people may take too long to read the page and it will time out on them.

Ideally, I want a dialogue box to pop up that gives the user the opportunity to reset the timer before the redirect happens. This I know is also possible with Javascript and I should be able to do it.

The problem is though, if the visitor has gone, the dialogue box will remain and the redirect will not happen.

I'd ideally like the dialogue box to close automatically after a set time and the page to redirect.

Is this possible? If so, how?

Any help appreciated.

Is it's not possible, I suppose I'll have to make the redirect time long enough so it doesn't time out too soon for anybody and have a big 'Home' button on every page.

Less elegant, but it will obviously work.
Jun 21 '07 #1
5 2908
acoder
16,027 Expert Mod 8TB
Welcome to TSDN!

Unfortunately, the dialogue boxes are modal and I don't think this is possible.

What you can do, however, is create your own confirmation dialogue box using DHTML. That would be easy to control using Javascript.
Jun 22 '07 #2
Thanks for the welcome. That was pretty much the conclusion I was coming to after some thought.

It would work just as well really.

Would there be a way of triggering the pop-up when the timeout reaches a certain point? EG 10 seconds before the redirect occured?

Would I need to use 2 timeout routines? One to trigger the pop-up and another for the redirect?
Jun 22 '07 #3
acoder
16,027 Expert Mod 8TB
Yes, you could have it as two timeout routines. One possibility is to set the timeout for the redirect in the function which is called in the first timeout
Jun 22 '07 #4
Got it working now.

I found I could use the counter to trigger each event at different stages of the countdown. The redirect and a DHTML popup that refreshed the page when a link is clicked and therefore reset the timer and made the popup disappear again.

Thanks for your help.
Jun 27 '07 #5
acoder
16,027 Expert Mod 8TB
No problem. Glad you got it working.
Jun 28 '07 #6

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

Similar topics

2
by: Robert Gordon | last post by:
I now realize I probably should have tried posting this on the IIS board first.. I am running OWA 2003 Server as Front End server to my Exchange 2000 native domain. The FE server is secured by...
6
by: mr_buggerlugs | last post by:
Any idea how i'd create a javascript which auto redirects to a specified url every 5 seconds until the url specified is reached? So if the url specified is redirected elsewhere it redirects to...
11
by: Mr. Smith | last post by:
Hello all, My code can successfully open, write to, format and save several worksheets in a workbook then save it by a given name, close and quit excel. My problem is that if I try and do it...
5
by: kevin | last post by:
Hi, Any help with this would be really appreciated! I'm trying to download a file from a remote server. The access permissions is okay but the problem I'm facing is that the file is getting...
2
by: VB Programmer | last post by:
I created a page which I am using to prevent the user from hitting the BACK button. I'll call it my "Auto Jump" page. When it is called it basically auto-redirects to a page specified in the...
5
by: Josselin | last post by:
I have a page 'pni.php' to which paypal is redirecting after payment thsi page contains a db update script, no problem it's running well but once this script is executed (transparently for the...
9
by: Beowulf | last post by:
I was having this problem: http://groups.google.com/group/microsoft.public.sqlserver.server/msg/e36e423972323378?dmode=source with it taking an inordinate amount of time to enumerate the...
1
by: Carlo | last post by:
I am trying to seek the following functionality: A user clicks on a download buton I can automatically download a file, but since in the end i must end the response, its either the download or...
4
by: Suzette | last post by:
I have an excel file that automatically updates when opened, pulling information from an Access database into into various pivot tables. I created a macro in Access to perform various necessary...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.