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


Groups > comp.lang.javascript > #31834

Re: How to deal with "messy" quotes?

Path csiph.com!aioe.org!news.mixmin.net!weretis.net!feeder4.news.weretis.net!feeder5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Newsgroups comp.lang.javascript
Subject Re: How to deal with "messy" quotes?
Date Tue, 13 Dec 2016 13:17:59 +0100
Organization PointedEars Software (PES)
Lines 42
Message-ID <1903833.irdbgypaU6@PointedEars.de> (permalink)
References <e02b3e17-0584-4751-ac26-28897820e1c2@googlegroups.com> <zuB3A.371253$kM7.70526@fx44.am4> <da86b656-3c71-4d67-bb56-26661b51ab61@googlegroups.com> <VOB3A.181572$eh.139780@fx08.am4> <5d7849ff-803f-44bf-a64a-f51f7df741ab@googlegroups.com> <71de1dbd-1779-4131-8c68-4c9d6e01d774@googlegroups.com> <FfR3A.215307$223.44894@fx20.am4>
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 1481631480 12352 eJwFwYEBwCAIA7CXhJVSz1EY/59gEh+NlWAQMTENnbxXlc0dV+vI1bAp9pT7+gk7GuOGxvEAJg0REg== (13 Dec 2016 12:18:00 GMT)
X-Complaints-To abuse@news.solani.org
NNTP-Posting-Date Tue, 13 Dec 2016 12:18:00 +0000 (UTC)
User-Agent KNode/4.14.2
X-User-ID eJwNy8kBwCAMA7CVyGED4xCX7D8C1V8IGjWTYKLR0Tu+5SyMoNZxQLi57GZnyc/BnBZOqlrF0A79xzRst/EBResVMw==
X-Face %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&.<b';Md8`dH6iqhT)6C^.Px|[=M@7=Ik[_w<%n1Up"LPQNu2m8|L!/3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rdZ2AWNNg/YOhQyrVBnb+i+nEg4bsDA+egAAAABJRU5ErkJggg==
Xref csiph.com comp.lang.javascript:31834

Show key headers only | View raw


cyber@example.com wrote:

> justaguy <lichunshen84@gmail.com> wrote:
>> On Monday, December 12, 2016 at 5:10:17 PM UTC-5, justaguy wrote:
>>> On Monday, December 12, 2016 at 1:15:22 PM UTC-5, cy...@example.com
>>> wrote:
>>> > justaguy <> wrote:
>>> > > On Monday, December 12, 2016 at 12:53:40 PM UTC-5, cy...@example.com
>>> > > wrote:
>>> > >> var newFN = function(f,n) {
                              ^^^
>>> > >>   console.log(f,n);
>>> > >>   }
> […]
> This should work:
> 
> s2.innerHTML = "&nbsp;"
>   + fn +
> " <input type='button' id='NewEl"+num+"' value='x' onclick =
  ^                               ^
> 'newFN(\""+fn+"\" + "+num+");'>";
                ^^^^^^^^^^^^^^
It does not.  (The value of) “num” has to be (the value of) the *second* 
argument to newFN().
 
> If NewEl is meant to be the string "NewEl" then you need to put it between
> quotes or else it will be be interpreted as a variable.
> And num and the + operator should be outside the quotes since num is meant
> to be a variable and + is meant to be the concatenation operator, but if
> you put them between quotes they will just be seen as being the strings
> "num" and "+" respectively.
> 
> BTW the s2 button would call newFN while leaving n undefined so that
> parameter could be removed.

What a load of nonsense.  Blind leading the blind.

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

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


Thread

How to deal with "messy" quotes? justaguy <lichunshen84@gmail.com> - 2016-12-11 16:23 -0800
  Re: How to deal with "messy" quotes? JJ <jj4public@vfemail.net> - 2016-12-12 12:42 +0700
    Re: How to deal with "messy" quotes? justaguy <lichunshen84@gmail.com> - 2016-12-12 09:56 -0800
      Re: How to deal with "messy" quotes? JJ <jj4public@vfemail.net> - 2016-12-13 18:18 +0700
        Re: How to deal with "messy" quotes? JJ <jj4public@vfemail.net> - 2016-12-13 18:22 +0700
          Re: How to deal with "messy" quotes? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-12-13 13:10 +0100
    Re: How to deal with "messy" quotes? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-12-12 20:43 +0100
  Re: How to deal with "messy" quotes? <cyber@example.com> - 2016-12-12 17:53 +0000
    Re: How to deal with "messy" quotes? justaguy <lichunshen84@gmail.com> - 2016-12-12 10:05 -0800
      Re: How to deal with "messy" quotes? <cyber@example.com> - 2016-12-12 18:15 +0000
        Re: How to deal with "messy" quotes? justaguy <lichunshen84@gmail.com> - 2016-12-12 14:10 -0800
          Re: How to deal with "messy" quotes? justaguy <lichunshen84@gmail.com> - 2016-12-12 16:56 -0800
            Re: How to deal with "messy" quotes? <cyber@example.com> - 2016-12-13 11:49 +0000
              Re: How to deal with "messy" quotes? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-12-13 13:17 +0100
                Re: How to deal with "messy" quotes? <cyber@example.com> - 2016-12-13 18:32 +0000
                Re: How to deal with "messy" quotes? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-12-13 19:47 +0100
                Re: How to deal with "messy" quotes? <cyber@example.com> - 2016-12-13 19:43 +0000
                Re: How to deal with "messy" quotes? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-12-14 12:24 +0100
              Re: How to deal with "messy" quotes? justaguy <lichunshen84@gmail.com> - 2016-12-13 17:07 -0800
    Re: How to deal with "messy" quotes? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-12-12 21:19 +0100
      Re: How to deal with "messy" quotes? justaguy <lichunshen84@gmail.com> - 2016-12-12 12:51 -0800
  Re: How to deal with "messy" quotes? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-12-12 20:50 +0100

csiph-web