Forum Moderators: open
I've surfed all over Google, and the above script is the *closest* I've came thus far, but something isn't quite right. However, the script doesn't allow the browser 15 seconds to load the iframe, it immediately refreshes to the new page. That defeats the purpose --giving the rest of the page time to load, before executing the framed file.
Please double check that script and find out if there is a reason it is not allowing the time-delay of x# of seconds before loading that redirect or refresh target page.
----
I found another great page on the problem. Yet, I am facing the same problem with the iframe immediately loading the large animation, no time delay. I'm using Internet Explorer 6.0.
<script>
<!--
var version = parseInt(navigator.appVersion)
// replace is supported
if (version>=4 ¦¦ window.location.replace)
window.location.replace("http://www.example.us/frames/universe/")
else
window.location.href = "http://www.example.us/frames/universe/"
// -->
</script>
The information is *perfect*, except... how to set delayed loading time?
This code automatically refreshes to the page that's targeted, but gives no delay time (half of what a meta refresh tag is used for). I noticed in my search all over the web the majority of webmasters overlook that aspect.
That's the whole purpose for my using a refresh meta tag inside a frame, --to give the rest of the page time to load, before loading these sizeable graphics into the frame.
But if our visitors want to click on the back button and leave our website, I do not want them trapped with a disabled back button that's loading meta refresh pages. I want them to be able to return right back to wherever they came from. Having to make multiple clicks on the back button is aggravating and confusing).
Please explain how to set a time delay in the javascript?
I want it to load in 15 seconds, not immediately.
Thanks, Sharon
[edited by: jatar_k at 6:37 pm (utc) on Nov. 7, 2005]
[edit reason] no urls thanks [/edit]
I need the script to #1 Wait 15 seconds before loading the advertisement.
I need the script to #2 Not leave a record in their browser history of this loading page, so they can return to their point of origin without hinderance.
<html>
<head>
<title>Loading...</title>
<meta name="robots" content="noindex,follow">
<meta http-equiv="refresh" content="15; url=http://www.example.us/frames/universe/">
<script>
<!--
var version = parseInt(navigator.appVersion)
// replace is supported
if (version>=4 ¦¦ window.location.replace)
window.location.replace("http://www.example.us/frames/universe/")
else
window.location.href = "http://www.example.us/frames/universe/"
// -->
</script>
<style>body {scrollbar-arrow-color: #5B5959; font-family: tahoma; font-size: 12; scrollbar-darkshadow-color: #000000; scrollbar-base-color: #ececec; background-color: #131617} a {color: #808080; text-decoration:none} a:hover{font-weight:bold}</style>
</head>
<body bgcolor="#131617">
<font color="#cccccc">
<a name=scrollingCode></a>
<marquee onmouseover="this.stop()" onmouseout="this.start()" scrollAmount=2 scrollDelay=1 direction="left" width=500 height=355 align="left">
<sup><strong>L o a d i n g . . . . </strong></sup>
</marquee>
</font>
</body>
</html>
[edited by: jatar_k at 6:38 pm (utc) on Nov. 7, 2005]
[edit reason] generalized urls [/edit]
Sharon: It wasn't meant like that. My apologies if my intentions were misunderstood. Just being very precise about what I'm after, up front. I spent a good 2 or 3 days studying all over the web and tried every kind of search string --been on this forum a few times during my search, the closest I came to an answer were the two pages (listed above) and I never post in forums unless it is a last resort.
--
Kaled: You need something like this:-
setTimeout("location.replace('target.html')",5000);
Sharon: Thank you for that piece of code, but where and how does that piece of code fit into the javascript? I am one of those individuals not so familiar with writing javascripts, and one character in the syntax can disable the entire script. I'd appreciate the tip on how it is written in the code. Like many webmasters, I'm still learning about javascript.