Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #11718

Re: Simple parameter passing within a setInterval() call?

From Tuxedo <tuxedo@mailinator.com>
Newsgroups comp.lang.javascript
Subject Re: Simple parameter passing within a setInterval() call?
Date 2012-02-12 09:22 +0100
Organization albasani.net
Message-ID <jh7ssk$itp$1@news.albasani.net> (permalink)
References <jh6e3o$73s$1@news.albasani.net> <jh6jln$jjo$1@news.albasani.net> <1350222.i9fspTd0WE@PointedEars.de> <jh6mr2$rbb$1@news.albasani.net>

Show all headers | View raw


Andreas Bergmaier wrote:

[...]

> @Tuxedo: The thing is to have only one variable "x". The code should be
> 
> function initialFunction(x){
>      alert(x);
>      setInterval( function(){
>         alert(x);
>      }, 5000);
> }

Thanks - works great! Much better than my quoted parameters as in 
Stuff("' + x + '")',5000 etc.

Tuxedo

[..]

Back to comp.lang.javascript | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Simple parameter passing within a setInternal() call? Tuxedo <tuxedo@mailinator.com> - 2012-02-11 20:04 +0100
  Re: Simple parameter passing within a setInterval() call? Tuxedo <tuxedo@mailinator.com> - 2012-02-11 20:39 +0100
    Re: Simple parameter passing within a setInterval() call? Dr J R Stockton <reply1206@merlyn.demon.co.uk> - 2012-02-12 22:02 +0000
  Re: Simple parameter passing within a setInternal() call? Andreas Bergmaier <andber93@web.de> - 2012-02-11 21:39 +0100
    Re: Simple parameter passing within a setInternal() call? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-02-11 22:06 +0100
      Re: Simple parameter passing within a setInternal() call? Andreas Bergmaier <andber93@web.de> - 2012-02-11 22:33 +0100
        Re: Simple parameter passing within a setInternal() call? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-02-11 23:44 +0100
          Re: Simple parameter passing within a setInternal() call? Andreas Bergmaier <andber93@web.de> - 2012-02-12 03:04 +0100
        Re: Simple parameter passing within a setInterval() call? Tuxedo <tuxedo@mailinator.com> - 2012-02-12 09:22 +0100

csiph-web