/    Sign up×
Community /Pin to ProfileBookmark

Timed Redirect Script

I am using a timed redirect script from the javascript source web site and I would like to have my redirected page open in a new window. I am very new to java script and am not sure what to add or where to add it – so if anyone can help I would appreciate it. I have attempted to contact the original creator but my emails are returned undeliverable ?

Thanks in advance for any help offered ?
JulieAnn

to post a comment
JavaScript

5 Comments(s)

Copy linkTweet thisAlerts:
@UltimaterApr 22.2005 — Redirecting to a new window is just like a pop-up...

[color=royalblue]setTimeout('open("blah.htm").focus()',3000)//redirects in 3 seconds[/color]
Copy linkTweet thisAlerts:
@JulieAnnauthorApr 22.2005 — I tried your suggestion but could not get it to work i.e., redirect and open in a new window ?

I have another script running on the same page but I was able to edit the body tag to include both scripts so they both work...

I have a presentation slide show running which I may shorten but for now I need the redirect delayed up to this amount of time = '125000'...

I have tried a few other scripts but either they don't work at all (I get errors instead of redirects) or they want to redirect too fast (almost as soon as the first page loads)... I have edited for time but it didn't make a difference...

Here is the link to the script I am using and it works fine except for not loading a new window which I would like to do ?

http://javascript.internet.com/navigation/timed-redirect.html

Any help would be appreciated and if you need a link to my pages where I have it running - let me know ?

Thanks again

Julie Ann
Copy linkTweet thisAlerts:
@UltimaterApr 22.2005 — Did you provide my open function with a valid HTML file?


If not, just call the function open without passing it any arguments.

i.e. open() instead of open("blah.htm")
Copy linkTweet thisAlerts:
@Warren86Apr 23.2005 — <HTML>

<Head>

<Script Language=JavaScript>

function countDown(){

setTimeout("window.open('http://www.mysite.com/test.html')",5000);
}

function somethingElse(){}


</Script>

</Head>

<Body onload="countDown();somethingElse()">

</Body>

</HTML>
Copy linkTweet thisAlerts:
@FPergApr 23.2005 — I am newer to Javascript than you and had the exact roblem.

I used the "window.open" technique and it was STOPPED by my "Pop-Up" blocker. As it is, most every ISP, Browser and software-off-the-shelf offers some form of "blocker", so don't use "window.open", it creates a "pop-up" window..

In this forum, I asked the same question Jona replied, suggesting I use "location.replace" instead. IT WORKS LIKE A CHAMP!

<SCRIPT LANGUAGE="JavaScript">

<!-- Description: -->

<!-- Jump to HOME Page 13 seconds after start -->

<!-- -->

function redirect()

{

location.replace ("http://www.tlaconsulting.com/home.htm" );

}

</script>


<BODY onload="javascript:setTimeout('redirect()',13000);">
×

Success!

Help @JulieAnn spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...