Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #16309
| Path | csiph.com!usenet.pasdenom.info!gegeweb.org!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Norman Peelman <npeelmandog@cfl.rr.com> |
| Newsgroups | comp.lang.javascript |
| Subject | Re: Quotes are trouble |
| Date | Tue, 02 Oct 2012 01:57:23 -0400 |
| Organization | A noiseless patient Spider |
| Lines | 35 |
| Message-ID | <k4dvo4$8au$1@dont-email.me> (permalink) |
| References | <c94def8d-8e83-4b79-a971-f6be4acb5f84@r7g2000yqa.googlegroups.com> |
| Reply-To | npeelmandog@cfl.rr.com |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Injection-Date | Tue, 2 Oct 2012 05:57:25 +0000 (UTC) |
| Injection-Info | mx04.eternal-september.org; posting-host="ed5fa95fd7768731636de57c368d036f"; logging-data="8542"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+xa374jJQZqjBMey1pBttuX13+P6icoi4=" |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0 |
| In-Reply-To | <c94def8d-8e83-4b79-a971-f6be4acb5f84@r7g2000yqa.googlegroups.com> |
| Cancel-Lock | sha1:+CLo7aWnKoO7Vx97N0GtGcUhjmk= |
| Xref | csiph.com comp.lang.javascript:16309 |
Show key headers only | View raw
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