Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #16309
| From | Norman Peelman <npeelmandog@cfl.rr.com> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: Quotes are trouble |
| Date | 2012-10-02 01:57 -0400 |
| Organization | A noiseless patient Spider |
| Message-ID | <k4dvo4$8au$1@dont-email.me> (permalink) |
| References | <c94def8d-8e83-4b79-a971-f6be4acb5f84@r7g2000yqa.googlegroups.com> |
On 10/01/2012 05:36 PM, justaguy wrote:
> What I want to do is, to seed and then replace an image every 500ms.
>
> HTML code:
> <div id="main"></div>
>
> js code:
> function popMain(img) {
> document.getElementById('main').innerHTML = "<img src="+img+">";
> }
>
> function imgSlides() {
> imgs = [];
> imgs =
> ['kn1.png','kn2.png','kn3.png','kn4.png','kn5.png','kn6.png'];
> for (var i=0; i<6; i++) {
> // alert(imgs[i]);
> setTimeout(popMain(imgs[i]),500);
> }
> }
>
>
> err msg:
> missing quotes around argument?
>
> How do we fix the quotes? Thanks.
>
setTimeout("popMain(imgs[i])",500)
--
Norman
Registered Linux user #461062
AMD64X2 6400+ Ubuntu 10.04 64bit
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Quotes are trouble justaguy <lichunshen84@gmail.com> - 2012-10-01 14:36 -0700
Re: Quotes are trouble Andrew Poulos <ap_prog@hotmail.com> - 2012-10-02 09:24 +1000
Re: Quotes are trouble justaguy <lichunshen84@gmail.com> - 2012-10-01 17:01 -0700
Re: Quotes are trouble Stefan Weiss <krewecherl@gmail.com> - 2012-10-02 02:21 +0200
Re: Quotes are trouble justaguy <lichunshen84@gmail.com> - 2012-10-01 17:38 -0700
Re: Quotes are trouble Stefan Weiss <krewecherl@gmail.com> - 2012-10-02 06:56 +0200
Re: Quotes are trouble justaguy <lichunshen84@gmail.com> - 2012-10-03 21:33 -0700
Re: Quotes are trouble "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-10-04 07:58 +0000
Re: Quotes are trouble Denis McMahon <denismfmcmahon@gmail.com> - 2012-10-02 03:21 +0000
Re: Quotes are trouble Norman Peelman <npeelmandog@cfl.rr.com> - 2012-10-02 01:57 -0400
Re: Quotes are trouble Matt McDonald <matt@fortybelow.ca> - 2012-10-02 12:43 -0400
Re: Quotes are trouble Dr J R Stockton <reply1240@merlyn.demon.co.uk.invalid> - 2012-10-03 19:27 +0100
Re: Quotes are trouble justaguy <lichunshen84@gmail.com> - 2012-10-03 21:34 -0700
csiph-web