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


Groups > comp.lang.javascript > #16429

Re: Weak in javascript but stubborn as a mule

From Denis McMahon <denismfmcmahon@gmail.com>
Newsgroups comp.lang.javascript
Subject Re: Weak in javascript but stubborn as a mule
Date 2012-10-06 14:34 +0000
Organization A noiseless patient Spider
Message-ID <k4pfi3$fkc$2@dont-email.me> (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>

Show all headers | View raw


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

Rgds

Denis McMahon

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


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