setTimeout

J

JR

Hi,

I want to use in javascript-html the command setTimeout.
My problem is now How can I add a parameter
I want to parce the same parameter that called the routine called 't'
the problem is that it won't work with me
this is my code that I use
setTimeout("proc()",20);
It is the last line withing function proc


thanks

Jan
 
A

Andrew Urquhart

JR said:
I want to parce the same parameter that called the routine called 't'
the problem is that it won't work with me
this is my code that I use
setTimeout("proc()",20);
It is the last line withing function proc

function proc(strArg) {
setTimeout("proc(\"" + strArg + "\")", 20);
}

BTW: 20 milliseconds is probably below the granularity of most system
clocks
FYI: --
Andrew Urquhart
- FAQ: www.html-faq.com/
- Archive: www.google.com/groups?q=alt.html
- Contact: www.andrewu.co.uk/contact/
- Employ me: Front/middle tier ASP developer with WAI & web standards
 
W

Whitecrest

I want to use in javascript-html the command setTimeout.
My problem is now How can I add a parameter
I want to parce the same parameter that called the routine called 't'
First, what the heck is "t" Give it a name, it makes debugging easier.
setTimeout("proc()",20);
setTimeout("proc(" + t + ")",20);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top