Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #22377 > unrolled thread
| Started by | Jim Rojas <jrojas@tech-man.com> |
|---|---|
| First post | 2013-12-23 20:17 -0500 |
| Last post | 2013-12-27 23:25 +0100 |
| Articles | 2 on this page of 22 — 6 participants |
Back to article view | Back to comp.lang.javascript
Javascript Help Needed Jim Rojas <jrojas@tech-man.com> - 2013-12-23 20:17 -0500
Re: Javascript Help Needed "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-12-24 09:17 +0100
Re: Javascript Help Needed Jim Rojas <jrojas@tech-man.com> - 2013-12-24 10:01 -0500
Re: Javascript Help Needed Jim Rojas <jrojas@tech-man.com> - 2013-12-24 10:02 -0500
Re: Javascript Help Needed "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-12-24 18:11 +0100
Re: Javascript Help Needed Jim Rojas <jrojas@tech-man.com> - 2013-12-24 12:24 -0500
Re: Javascript Help Needed "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-12-24 19:03 +0100
Re: Javascript Help Needed Denis McMahon <denismfmcmahon@gmail.com> - 2013-12-24 19:18 +0000
Re: Javascript Help Needed Dr J R Stockton <reply1300@merlyn.demon.co.uk.invalid> - 2013-12-25 23:06 +0000
Re: Javascript Help Needed Denis McMahon <denismfmcmahon@gmail.com> - 2013-12-24 19:52 +0000
Re: Javascript Help Needed Jim Rojas <jrojas@tech-man.com> - 2013-12-24 15:02 -0500
Re: Javascript Help Needed Christoph Michael Becker <cmbecker69@arcor.de> - 2013-12-24 22:07 +0100
Re: Javascript Help Needed Denis McMahon <denismfmcmahon@gmail.com> - 2013-12-25 02:16 +0000
Re: Javascript Help Needed Jim Rojas <jrojas@tech-man.com> - 2013-12-24 21:48 -0500
Re: Javascript Help Needed Dr J R Stockton <reply1300@merlyn.demon.co.uk.invalid> - 2013-12-25 23:05 +0000
Re: Javascript Help Needed Christoph Michael Becker <cmbecker69@arcor.de> - 2013-12-24 22:09 +0100
Re: Javascript Help Needed Denis McMahon <denismfmcmahon@gmail.com> - 2013-12-25 01:51 +0000
Re: Javascript Help Needed Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-12-26 07:38 +0100
Re: Javascript Help Needed Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-12-26 10:42 +0100
Re: Javascript Help Needed Jim Rojas <jrojas@tech-man.com> - 2013-12-26 13:14 -0500
Re: Javascript Help Needed Christoph Michael Becker <cmbecker69@arcor.de> - 2013-12-27 22:49 +0100
Re: Javascript Help Needed Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-12-27 23:25 +0100
Page 2 of 2 — ← Prev page 1 [2]
| From | Christoph Michael Becker <cmbecker69@arcor.de> |
|---|---|
| Date | 2013-12-27 22:49 +0100 |
| Message-ID | <52bdf5fa$0$9502$9b4e6d93@newsspool1.arcor-online.net> |
| In reply to | #22411 |
Thomas 'PointedEars' Lahn wrote: > Christoph Michael Becker wrote: > >> Denis McMahon wrote: >>> >>> You have unescaped ampersands in your countries option list, and your >>> innerhtml code includes html closing tags which it is usually a good idea >>> to split up, eg instead of: >>> >>> blah.innerHTML += "</B>"; >>> >>> use something like: >>> >>> blah.innerHTML += "<"+"/"+"B>"; >>> >>> to avoid any sequence of '<' + '/' + letter occurring inside the script >>> tags, as these may confuse the rendering engine. >> >> A simpler and more efficient solution to comply with HTML parsers (which >> might consider </ as introducing a closing tag) is: > > The proper terms are _end tag_ and End Tag Open (ETAGO) delimiter, > respectively. ETAGO in script code is only necessary to be escaped if the > code is in an HTML < 5 document. Thanks. :) > Nowadays the easiest and – for several reasons – recommended way to work > around this is to include a script resource. In my experience, over time > inline script code soon grows too much so that it is moved to an included > script resource. There are other potential advantages of the latter, such > as parallel loading and better editor support. This application, being > small, and the script code limited to a single purpose, may be an exception. > >> blah.innerHTML += "<\/B>" >> >> (Of course, one should preferably build up the value of the innerHTML >> property in advance.) > > A solution relying on “innerHTML” etc. alone is not accessible as it will > not work if a script engine is not used. ACK. However, appending to the innerHTML property might be used to add addtional markup, for instance, a button element which offers some convenience functionality which requires the script engine to be enabled. >> [1] <http://www.w3.org/TR/REC-html40/interact/scripts.html#h-18.2.1> >> [2] <http://www.w3.org/TR/html5/scripting-1.html#the-script-element> > > Read more carefully before you cite: > > <http://www.w3.org/TR/2012/CR-html5-20121217/syntax.html#syntax> > <http://www.w3.org/TR/2012/CR-html5-20121217/syntax.html#script-data-state> I shall do my best. :) -- Christoph M. Becker
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2013-12-27 23:25 +0100 |
| Message-ID | <2691748.Rr6QvYKny9@PointedEars.de> |
| In reply to | #22442 |
Christoph Michael Becker wrote: > Thomas 'PointedEars' Lahn wrote: >> Christoph Michael Becker wrote: >>> blah.innerHTML += "<\/B>" >>> >>> (Of course, one should preferably build up the value of the innerHTML >>> property in advance.) >> >> A solution relying on “innerHTML” etc. alone is not accessible as it will >> not work if a script engine is not used. > > ACK. However, appending to the innerHTML property might be used to add > addtional markup, for instance, a button element which offers some > convenience functionality which requires the script engine to be enabled. Those should be appended by using document.write() or Element::appendChild() instead, because *appending* to .innerHTML requires the existing content to be serialized, and the result to be parsed again. Where available, the latter method call should be preferred because it does not slow down rendering of the static parts of the document. (I am adding this to the ES Matrix as another optimization step.) -- PointedEars Twitter: @PointedEars2 Please do not Cc: me. / Bitte keine Kopien per E-Mail.
[toc] | [prev] | [standalone]
Page 2 of 2 — ← Prev page 1 [2]
Back to top | Article view | comp.lang.javascript
csiph-web