Hi,
I'm working with mozilla, building a little XUL app.
I have a datasource, and want to display a message
once it is loaded (datasource.loaded is true).
So, I thought to use timouts, but as the code to execute is
passed as a string, I cannot pass local variable to this code.
Anyone has a suggestion?
Thanks.
Raph
Here is what I wanted to do (but I can't pass the datasource as argument):
setTimeout(check_if_loaded(datasource), 500)
with this function:
function check_if_loaded(a_ds)
{
if (!datasource.loaded)
{
setTimeout(check_if_loaded(datasource), 500)
}
} 4 14801
On Wed, 05 Nov 2003 15:55:28 +0100, Raphael Bauduin
<ra*************@be.easynet.net> wrote: I'm working with mozilla, building a little XUL app. I have a datasource, and want to display a message once it is loaded (datasource.loaded is true).
I imagine it'll throw an event at such a time, catch that event, don't
test datasource.loaded is true at intervals, in fact if the technology
does require you to do this, walk away now, the technology is flawed
it should be event driven.
Jim.
--
comp.lang.javascript FAQ - http://jibbering.com/faq/
Jim Ley wrote: On Wed, 05 Nov 2003 15:55:28 +0100, Raphael Bauduin <ra*************@be.easynet.net> wrote:
I'm working with mozilla, building a little XUL app. I have a datasource, and want to display a message once it is loaded (datasource.loaded is true).
I imagine it'll throw an event at such a time, catch that event, don't test datasource.loaded is true at intervals, in fact if the technology does require you to do this, walk away now, the technology is flawed it should be event driven.
The event thing is what I'm looking at right now, but I still wonder how
to pass arguments to code called by a timeout.
Thanks for your remark anyway ;-)
Raph Jim.
"Raphael Bauduin" <ra*************@be.easynet.net> wrote in message
news:3F**************@be.easynet.net...
<snip> The event thing is what I'm looking at right now, but I still wonder how to pass arguments to code called by a timeout.
Some setTimeout implementations, probably including Mozilla's (as
Netscape 4 implemented it) will, when passed a function reference as
their first argument, accept arguments 3 to n as additional parameters
and pass these parameters on to the function referenced in the first
argument when it is called.
Richard. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Robert Mark Bram |
last post by:
Howdy All!
How can I make something like this work?
var message = "This will appear in 10 seconds";
setTimeout ('alert(message)', 10000);
Thanks for any advice!
|
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) {...
|
by: Mic |
last post by:
Goal: delay execution of form submit
Code (Javascript + JScript ASP):
<%
Response.Write("<OBJECT ID='IntraLaunch' STYLE='display : none'
WIDTH=0 HEIGHT=0...
|
by: Frances Del Rio |
last post by:
this code is supposed to flip imgs at intervals of one second, but it
flipps them much faster, it seems it flips them all in that first
second, the more seconds the faster it flips them, instead of...
|
by: Ken |
last post by:
Hello
I am trying to change the color of a font in a text box.
I have been reading about and trying various examples found it this
group, but still can't get it right.
Here is where I am...
|
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,...
|
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 =...
|
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...
|
by: alex.malgaroli |
last post by:
Hi all.
I didn't find anything on the web regarding this different behaviour I
found in Firefox (v. 2) and IE (v. 6), so I'm posting it here, maybe
someone will benefit from this.
I have a...
|
by: liketofindoutwhy |
last post by:
I did some animation using
var oDiv = {};
oDiv.x = 100;
oDiv.y = 100;
oDiv.node = document.getElementById('divImage');
oDiv.node.style.position = "absolute";
oDiv.doAnimation = function()...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
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...
| |