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

setTimeout

Hoi again...

I trie to recall a function after 15 sec. the code I use is like this

function reloads() {
switch (stPage)
{
case 0: setTimeout("document.getElementById('myIframe').sr c
='empty.htm'",0);
stPage= 1;
break;
case 1: setTimeout("document.getElementById('myIframe').sr c
='test.htm'",0);
stPage= 2;
break;
case 2: setTimeout("document.getElementById('myIframe').sr c
='test2.htm'",0);
stPage= 1;
break;
}
setTimeout=("reloads()",15000);
}

but I always get the error "Object doesn't support this action" Can someone
help my out with this problem?

thanks

greetings
Koen
Jul 23 '05 #1
4 1756
Message de Keon émis le jeudi 25 novembre 2004 12:44 :
Hoi again...

I trie to recall a function after 15 sec. the code I use is like this

function reloads() {
switch (stPage) {
case 0: setTimeout("document.getElementById('myIframe').sr c
='empty.htm'",0); stPage= 1; break;
case 1: setTimeout("document.getElementById('myIframe').sr c
='test.htm'",0) ; stPage= 2; break;
case 2: setTimeout("document.getElementById('myIframe').sr c
='test2.htm'",0); stPage= 1; break;
}
setTimeout=("reloads()",15000);
}

but I always get the error "Object doesn't support this action" Can
someone help my out with this problem?

Try without "setTimeout" :

....
case 0: document.getElementById('myIframe').src ='empty.htm'; stPage=
1; break;
case 1: document.getElementById('myIframe').src ='test.htm' ; stPage=
2; break;
case 2: document.getElementById('myIframe').src ='test2.htm'; stPage=
1; break;
....

--
Cordialement, Thierry ;-)

Jul 23 '05 #2

"Cenekemoi" <tb************@harrysoftwareCACA.comPOPO> wrote in message
news:41***********************@news.wanadoo.fr...
Message de Keon émis le jeudi 25 novembre 2004 12:44 :
Hoi again...

I trie to recall a function after 15 sec. the code I use is like this

function reloads() {
switch (stPage) {
case 0: setTimeout("document.getElementById('myIframe').sr c
='empty.htm'",0); stPage= 1; break;
case 1: setTimeout("document.getElementById('myIframe').sr c
='test.htm'",0) ; stPage= 2; break;
case 2: setTimeout("document.getElementById('myIframe').sr c
='test2.htm'",0); stPage= 1; break;
}
setTimeout=("reloads()",15000);
}

but I always get the error "Object doesn't support this action" Can
someone help my out with this problem?

Try without "setTimeout" :

...
case 0: document.getElementById('myIframe').src ='empty.htm'; stPage=
1; break;
case 1: document.getElementById('myIframe').src ='test.htm' ; stPage=
2; break;
case 2: document.getElementById('myIframe').src ='test2.htm'; stPage=
1; break;
...

--
Cordialement, Thierry ;-)


But I think you miss understand me.
The problem is not changing the iframe but the recal of the function.
setTimeout=("reloads()",15000);

greetings
Koen
Jul 23 '05 #3
Keon wrote:
setTimeout=("reloads()",15000);

^

setTimeout("reloads()",15000);

Daniel
Jul 23 '05 #4

"Daniel Kirsch" <Iw*****************@gmx.de> wrote in message
news:co*************@news.t-online.com...
Keon wrote:
setTimeout=("reloads()",15000);

^

setTimeout("reloads()",15000);

Daniel


Indeed. Now it work perfect

greeting
Koen
Jul 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Jupiter49 | last post by:
I'm trying to move pictures around on the screen, with a slight delay between the first picture and second picture (following onmousemove). When I add the setTimeout function I must be doing it...
3
by: domeceo | last post by:
can anyone tell me why I cannot pass values in a setTimeout function whenever I use this function it says "menu is undefined" after th alert. function imgOff(menu, num) { if (document.images) {...
2
by: Athanasius | last post by:
Could someone shed some light as to why the following setTimeout function will not work on the Mac IE5.2? It does however work on PC(Forefox,Netscape,IE) & Mac(Safari,Firefox). Here is the script,...
6
by: Brent | last post by:
Is there any obvious reason why there's no delay in the execution of setting the id.style.display when this function gets called? function Hide(divId,timeout) { var id =...
12
by: Andrew Poulos | last post by:
With the following code I can't understand why this.num keeps incrementing each time I create a new instance of Foo. For each instance I'm expecting this.num to alert as 1 but keeps incrementing. ...
28
by: Andre | last post by:
Hi, Does anyone know whether the ECMA, or an other standard document, specifies a maximum for the value that can be pass to the setTimeOut() function in Javascript? Andre
4
by: E | last post by:
I am having trouble with setTimeout working on a second call to the setTimeout function from a second page which is an html page. Here is the scenario. I have a web page and onload it calls a...
6
by: Max | last post by:
Hi, I'm not exactly sure why this doesn't work. I'm basically just trying a simple approach at a slide down div. function slide_div { ...
15
by: nikki_herring | last post by:
I am using setTimeout( ) to continuously call a function that randomly rotates/displays 2 images on a page. The part I need help with is the second image should rotate 3 seconds after the first...
7
by: Martin | last post by:
Can I have two setTimeouts running at the same time - with two different intervals? I want to start one timer and, before it times out, start another one I've tried this and they seems to...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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.