![]() | |
![]() |
| | Thread Tools | Display Modes |
#21
| |||
| |||
|
|
Or * * s.display = (txt.charAt(0) === "0") ? 'none' : ''; *// untested |
#22
| |||
| |||
|
|
On Jun 8, 6:19 pm, Dr J R Stockton <j... (AT) merlyn (DOT) demon.co.uk> wrote: Or s.display = (txt.charAt(0) === "0") ? 'none' : ''; // untested Or s.display = (txt[0] === "0") ? 'none' : ''; // tested in Safari, FF and Opera. |
#23
| |||
| |||
|
|
(...) txt[0] === "0" (...) (...) does not work in IE/MSHTML, for example, (...) |
#24
| |||
| |||
|
|
Thomas 'PointedEars' Lahn wrote: (...) txt[0] === "0" (...) (...) does not work in IE/MSHTML, for example, (...) "for example" ? |
|
ROTFLOL... how come... IE *again*, one more time ? |
|
Math.pow(LOL, 16384); |
#25
| |||
| |||
|
|
s.display = (txt[0] === "0") ? 'none' : ''; // tested in Safari, FF and Opera. |
#26
| |||
| |||
|
|
In comp.lang.javascript message <1cc2d6f2-33dc-4e5b-9633-9bec28efc120@l4 2g2000hsc.googlegroups.com>, Sun, 8 Jun 2008 13:21:56, Jorge jorge (AT) jorgechamorro (DOT) com> posted: s.display = (txt[0] === "0") ? 'none' : ''; // tested in Safari, FF and Opera. Only when writing for a rigorously-controlled intranet can it be safe to omit testing in MS IE. |
#27
| ||||||
| ||||||
|
|
Dr J R Stockton wrote: In comp.lang.javascript message 1cc2d6f2-33dc-4e5b-9633-9bec28efc120@l4 2g2000hsc.googlegroups.com>, Sun, 8 Jun 2008 13:21:56, Jorge <jorge (AT) jorgechamorro (DOT) com> posted: s.display = (txt[0] === "0") ? 'none' : ''; // tested in Safari, FF and Opera. Only when writing for a rigorously-controlled intranet can it be safe to omit testing in MS IE. What about Greasemonkey scripts? What about Yahoo Widgets? What about ECMAScript programs, in short, that are written specifically to run under a particular implementation? |
|
That implementation may even be a browser, |
|
for that matter; I've written ECMAScript applications that are only supported under the Mozilla engine. You want to run them, you run them under a Mozilla derivative. |
|
There's no compelling need for me to make them run under other implementations, any more than I have a need to stick to ISO C for all of my C applications. |
|
I'd agree that when writing scripts for general use, testing under Microsoft's implementation is advisable, but "a rigorously-controlled intranet" is hardly the only alternative to "general use". |
|
Sometimes the c.l.j regulars - excellent though much of their advice may be - appear to forget that there are uses for ECMAScript other than scripting general-use web pages. |
#28
| |||||
| |||||
|
|
Michael Wojcik wrote: Dr J R Stockton wrote: In comp.lang.javascript message 1cc2d6f2-33dc-4e5b-9633-9bec28efc120@l4 2g2000hsc.googlegroups.com>, Sun, 8 Jun 2008 13:21:56, Jorge <jorge (AT) jorgechamorro (DOT) com> posted: s.display = (txt[0] === "0") ? 'none' : ''; // tested in Safari, FF and Opera. Only when writing for a rigorously-controlled intranet can it be safe to omit testing in MS IE. What about Greasemonkey scripts? What about Yahoo Widgets? What about ECMAScript programs, in short, that are written specifically to run under a particular implementation? ACK for Greasemonkey scripts. But are Yahoo widgets really written specifically to run under a particular implementation? |
|
That implementation may even be a browser, A Web browser is not an ECMAScript implementation; it may provide one. |
|
for that matter; I've written ECMAScript applications that are only supported under the Mozilla engine. You want to run them, you run them under a Mozilla derivative. More specifically, you are required to have XUL support before being able to run them. At least that is the only justification for this restriction that I could accept. |
|
There's no compelling need for me to make them run under other implementations, any more than I have a need to stick to ISO C for all of my C applications. True, but this thread was about something else. |
|
Sometimes it is necessary to point out that a suggested feature is not universally available. AFAICS, this thread was about "AJAX" in HTML user agents in general and so the remarks regarding differences in implementations were justified. |
![]() |
| Thread Tools | |
| Display Modes | |
| |