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


Groups > comp.lang.javascript > #26392

Re: simple error

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Newsgroups comp.lang.javascript
Subject Re: simple error
Date Sun, 28 Dec 2014 18:25:44 +0100
Organization PointedEars Software (PES)
Lines 25
Message-ID <1485747.16sIkefZu1@PointedEars.de> (permalink)
References <m7pdlm$1ju$1@gregory.bnet.hr>
Reply-To Thomas 'PointedEars' Lahn <cljs@PointedEars.de>
Mime-Version 1.0
Content-Type text/plain; charset="UTF-8"
Content-Transfer-Encoding 8Bit
X-Trace solani.org 1419787566 10250 eJwFwQkBwDAIA0BL5UmKHUiHfwm7Q9ComwQTi233SZ1JSuPtZThW8bT3WtFDDkHfzEOz9wcbhRF0 (28 Dec 2014 17:26:06 GMT)
X-Complaints-To abuse@news.solani.org
NNTP-Posting-Date Sun, 28 Dec 2014 17:26:06 +0000 (UTC)
User-Agent KNode/4.14.2
X-User-ID eJwFwQkBwDAIA0BLobyVAyvxL2F3riHxpYWHOZ0sPJPddzTQx0atE5IuBL24XSNYXO4YpfrdGTdMSW4lf1QWFbo=
Cancel-Lock sha1:LhRMGJtFCLwKZFbqHENhZtbBu8w=
X-NNTP-Posting-Host eJwFwQkBwDAIA0BLpHxDDpTGv4TduQbipoWHOZ3zGLst9yBSIKOrp4HeMc9iZ6rAlVP1Fd8PJYkRJw==
Xref csiph.com comp.lang.javascript:26392

Show key headers only | View raw


Haris Bogdanovich wrote:

> <td onclick='this.innerHTML = 'X';'>--</td>
> 
> Why it won't change to X when I click on it ?

Possibility: Assuming error correction, the resulting script code is

  this.innerHTML = X;

and the identifier “X” is not defined.  (See the error console.  See the FAQ  
for details on debugging.)

You must not use the same character as markup attribute value delimiter and 
script string value delimiter.  In this simple case, use either “'” and “"”, 
or “"” and “'”, respectively.  In other cases you can use a character 
reference or character entity reference to avoid the offending code, or you 
need to move the offending code elsewhere and use that from the attribute 
value.

-- 
PointedEars
FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-matrix>
Please do not cc me. / Bitte keine Kopien per E-Mail.

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


Thread

simple error Haris Bogdanovich <haris.bogdanovic@gmail.com> - 2014-12-28 18:12 +0100
  Re: simple error Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-12-28 18:25 +0100
    Re: simple error "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2014-12-28 21:00 +0200
      Re: simple error Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-12-28 21:32 +0100
        Re: simple error "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2014-12-28 23:56 +0200
  Re: simple error Denis McMahon <denismfmcmahon@gmail.com> - 2014-12-28 18:46 +0000
    Re: simple error "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2014-12-28 21:13 +0200
      Re: simple error Denis McMahon <denismfmcmahon@gmail.com> - 2014-12-28 23:19 +0000
        Re: simple error Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-12-29 01:03 +0100
        Re: simple error "Christoph M. Becker" <cmbecker69@arcor.de> - 2014-12-29 01:08 +0100
    Re: simple error Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-12-28 20:13 +0100
      Re: simple error "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2014-12-28 22:30 +0200
        Re: simple error Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-12-28 21:44 +0100
          Re: simple error "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2014-12-28 23:50 +0200
            Re: simple error "Christoph M. Becker" <cmbecker69@arcor.de> - 2014-12-28 23:10 +0100
              Re: simple error Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-12-29 03:10 +0100
                Re: simple error "Christoph M. Becker" <cmbecker69@arcor.de> - 2014-12-29 13:17 +0100
                Re: simple error Tim Streater <timstreater@greenbee.net> - 2014-12-29 12:30 +0000
                Re: simple error "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2014-12-29 14:49 +0200
                Re: simple error Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-12-29 15:18 +0100
              Re: simple error "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2014-12-29 08:20 +0200
                Re: simple error "Christoph M. Becker" <cmbecker69@arcor.de> - 2014-12-29 12:36 +0100
                Re: simple error Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-12-29 15:40 +0100
            Re: simple error Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-12-29 01:04 +0100
              Re: simple error "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2014-12-29 08:09 +0200

csiph-web