|
how can I call a page eg: B.htm from a page A.htm without having to click any link? For eg. in 5 secs the page A.htm automatically calls the page B.htm?
thanks
|
|
|
Here`s a complete page of code that will show you exactly how to do this:
<script language=javascript1.2>
function NavToPageB() {
window.navigate("http://www.yahoo.com");
}
function LoadTrigger() {
setTimeout("NavToPageB()",5000);
}
window.onload = LoadTrigger;
</script>
This page will automatically navigate to Yahoo.com.
|
|
|
|
|
I guess I should explain a little more...I`m tired--it`s way past my bedtime! When the page finishes loading, the LoadTrigger() function is called. It uses setTimeout to wait 5 seconds, then call the NavToPageB() function, which navigates to page B. setTimeout takes to arguments. First is the code to run or function to call and second is how long to wait before running the code. This is in thousands of a second so 1000 = 1 second. 5000 = 5 seconds.
|
|
|
|
|
I'm sorry i can't give you any help, but I advice that you can search the question in google, there are many solution about it! Good Luck!
__________________________ logo maker|flash banner|
|
|
|
|
|
|
|
|