Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #16431
| From | Jake Jarvis <pig_in_shoes@yahoo.com> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: Weak in javascript but stubborn as a mule |
| Date | 2012-10-06 19:20 +0200 |
| Message-ID | <adb7ibFgo6gU1@mid.uni-berlin.de> (permalink) |
| References | <506ee544$0$21946$426a34cc@news.free.fr><50700053$0$1734$426a74cc@news.free.fr><XnsA0E47C8E671D9eejj99@194.109.133.133><50702315$0$6112$426a74cc@news.free.fr> <k4pfi3$fkc$2@dont-email.me> <50704b2c$0$6459$426a74cc@news.free.fr> |
On 06.10.2012 17:16, jmrw wrote:
> "Denis McMahon" <denismfmcmahon@gmail.com> a écrit dans le message de news:
> k4pfi3$fkc$2@dont-email.me...
>> On Sat, 06 Oct 2012 14:24:56 +0200, jmrw wrote:
>>
>>> "Evertjan." <exxjxw.hannivoort@inter.nl.net> a écrit dans le message de
>>> news: XnsA0E47C8E671D9eejj99@194.109.133.133...
>>>> jmrw wrote on 06 okt 2012 in comp.lang.javascript:
>>>>
>>>>> On my page http://www.jmrw.com/Chess/Tableau_echecs/index.htm
>>>>>
>>>>> I would like to place the legend - listeOeuvres[6*compteur] - under
>>>>> the painting.
>>>>>
>>>>> I am sure it is not difficult,
>>>>
>>>> So why ask,
>>>> such difficulty should surly be measured according to your skill?
>>>>
>>>>> but how to do?
>>>>
>>>> Presuming you want to have different texts under different images,
>>>> with a step 6 incrementing counter ok it?
>>>> [with a fixed text it is just html and off topic here in this NG]
>>>>
>>>> You could make a seperate <div> that you fill at the same time with a
>>>> text from a database or array, as you change the image.
>>>>
>>>> Please do not ask us to do your coding from scratch.
>>>>
>>>> --
>>>> Evertjan.
>>>> The Netherlands.
>>>> (Please change the x'es to dots in my emailaddress)
>>>
>>> I made a div : <DIV id="legende" style="border:1px solid;
>>> width:1000px; height:20px"></DIV>
>>>
>>> I try to fill it with : function fill_div()
>>> {document.getElementById('legende').innerHTML=listeOeuvres[6*Compteur
>> +1]};
>>>
>>> It doesn't work probably beaucause it is completly supid.
>>
>> The listeOeuvres[6*Compteur+1] is a text literal, it needs "" or '' round
>> it.
>>
>> The ";" comes after the line of javascript inside the function.
>>
>> Try:
>>
>> // code starts here -->
>>
>> function fill_div() {
>> document.getElementById('legende').innerHTML = "listeOeuvres[6*Compteur
>> +1]";
>> }
>>
>> // <-- code ends here
>
> Thanks but this write listeOeuvres[6*Compteur> +1] on my page !
>
What browser are you using? Try to find out how to access the place
where it shows script errors, most browsers today have that. In firefox
you can press Ctrl+Shift+J to open its error console for example.
With your original fill_div function in the code it should say something
like "Compteur is not defined", because names in this language are
case-sensitive and you only defined 'compteur'.
--
Jake Jarvis
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
How to simulate buttons pressed "jmrw" <jmrw@free.fr> - 2012-10-05 15:48 +0200
Re: How to simulate buttons pressed "jmrw" <jmrw@free.fr> - 2012-10-05 18:39 +0200
Re: How to simulate buttons pressed Martin Honnen <mahotrash@yahoo.de> - 2012-10-05 19:00 +0200
Re: How to simulate buttons pressed Danny <dann90038@gmail.com> - 2012-10-05 12:21 -0700
Re: How to simulate buttons pressed "jmrw" <jmrw@free.fr> - 2012-10-05 23:33 +0200
Weak in javascript but stubborn as a mule "jmrw" <jmrw@free.fr> - 2012-10-06 11:56 +0200
Re: Weak in javascript but stubborn as a mule "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-10-06 10:14 +0000
Re: Weak in javascript but stubborn as a mule "jmrw" <jmrw@free.fr> - 2012-10-06 14:24 +0200
Re: Weak in javascript but stubborn as a mule Denis McMahon <denismfmcmahon@gmail.com> - 2012-10-06 14:34 +0000
Re: Weak in javascript but stubborn as a mule "jmrw" <jmrw@free.fr> - 2012-10-06 17:16 +0200
Re: Weak in javascript but stubborn as a mule Jake Jarvis <pig_in_shoes@yahoo.com> - 2012-10-06 19:20 +0200
Re: Weak in javascript but stubborn as a mule "jmrw" <jmrw@free.fr> - 2012-10-06 20:08 +0200
Re: Weak in javascript but stubborn as a mule Denis McMahon <denismfmcmahon@gmail.com> - 2012-10-08 04:47 +0000
Re: How to simulate buttons pressed jmrw <jmrw@free.fr> - 2012-11-11 09:22 +0100
Re: How to simulate buttons pressed "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-11-11 09:46 +0100
Re: How to simulate buttons pressed jmrw <jmrw@free.fr> - 2012-11-11 10:35 +0100
Re: [OoT] How to simulate buttons pressed SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2012-11-11 12:14 +0100
Re: [OoT] How to simulate buttons pressed Tim Streater <timstreater@greenbee.net> - 2012-11-11 13:11 +0000
Re: [OoT] How to simulate buttons pressed "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-11-13 00:38 +0100
Re: [OoT] How to simulate buttons pressed SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2012-11-13 02:26 +0100
Re: [OoT] How to simulate buttons pressed "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-11-13 07:37 +0100
Re: [OoT] How to simulate buttons pressed John G Harris <john@nospam.demon.co.uk> - 2012-11-13 11:21 +0000
Re: [OoT] How to simulate buttons pressed "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-11-13 20:52 +0100
Re: [OoT] How to simulate buttons pressed Tim Streater <timstreater@greenbee.net> - 2012-11-13 20:15 +0000
Re: [OoT] How to simulate buttons pressed "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-11-13 22:45 +0100
Re: [OoT] How to simulate buttons pressed Tim Streater <timstreater@greenbee.net> - 2012-11-13 22:31 +0000
Re: [OoT] How to simulate buttons pressed Dr J R Stockton <reply1246@merlyn.demon.co.uk.invalid> - 2012-11-14 19:31 +0000
Re: [OoT] How to simulate buttons pressed John G Harris <john@nospam.demon.co.uk> - 2012-11-15 11:56 +0000
Re: [OoT] How to simulate buttons pressed Dr J R Stockton <reply1246@merlyn.demon.co.uk.invalid> - 2012-11-16 20:14 +0000
Re: [OoT] How to simulate buttons pressed Dr J R Stockton <reply1246@merlyn.demon.co.uk.invalid> - 2012-11-13 17:00 +0000
Re: [OoT] How to simulate buttons pressed "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-11-14 10:03 +0100
Re: [OoT] How to simulate buttons pressed Dr J R Stockton <reply1246@merlyn.demon.co.uk.invalid> - 2012-11-15 22:00 +0000
csiph-web