This didn't work.
Main Topics
Browse All TopicsI have a web title page that I display for 5 seconds and then re-direct using the following code:
redirtime = "5000";
redirurl = "https://www.mypage.ca/mai
function redirtimer()
{
self.setTimeout("self.loca
}
When I had Windows XP everything worked fine. Now that I have Vista, when it re-directs, it leaves the original page open and opens a new page for "main.asp". I only want one page.
Is there a solution for this problem?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Here my function is similiar to BraveBrain's in that I use setTimeout and window.location.href (notice I explicitly used window). I added 'var' to the variable declarations, and I made them local variables to make my example concise. This worked just fine in Firefox 2.0 on my Mac.
function redirtimer() {
var redirtime = 5000;
var redirurl = 'https://www.mypage.ca/mai
setTimeout( 'window.location.href = redirurl;', redirtime);
}
If this doesn't work I would like to help some more but I would need the answer to these questions:
1) What browser are you using?
2) In what context and how do you make the call to your redirtimer function?
3) Are you sure that the URL is correct?
I think that should work though,
- Joe P
I'll add another question to those ;)
4) Is there any particular reason you don't use a meta refresh?
If no, the syntax would then be
<meta http-equiv="Refresh" content="5; URL=https://www.mypage.ca/
in the head section of your page.
Business Accounts
Answer for Membership
by: BraveBrainPosted on 2007-08-11 at 09:44:36ID: 19676240
Try this:
function redirtimer()
{
setTimeout("location.href = redirurl;",redirtime);
}