Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!weretis.net!feeder4.news.weretis.net!news.teledata-fn.de!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="UTF-8" Message-ID: <1536350.F63rdpPjnV@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Wed, 11 Dec 2013 00:22:50 +0100 User-Agent: KNode/4.11.3 Content-Transfer-Encoding: 8Bit X-Face: %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&. column ? Newsgroups: comp.lang.javascript References: <4a645078$0$292$7a628cd7@news.club-internet.fr> <8d349f92-a64b-4837-9f00-cbcc4d07f985@k19g2000yqn.googlegroups.com> <0a06e88a-f13d-4ced-a49a-361556b80643@googlegroups.com> MIME-Version: 1.0 Lines: 42 NNTP-Posting-Date: 11 Dec 2013 00:22:54 CET NNTP-Posting-Host: 932e4402.newsspool2.arcor-online.net X-Trace: DXC=V4CP6J`EkZSYI9]OHn9o5^A9EHlD;3YcR4Fo<]lROoRQ8kFVO8EjaUaJd3J[6K=7W X-Complaints-To: usenet-abuse@arcor.de Xref: csiph.com comp.lang.javascript:22282 Denis McMahon wrote: > function hide(tid,c,h=true){ ^^^^^ Syntax error. Default parameters cannot (yet) be defined this way in strictly conforming implementations of ECMAScript. You have to initialize them if they are not present, for example: function hide(tid, c, h) { if (typeof h == "undefined") { h = true; } /* or */ if (arguments.length < 3) { h = true; } The difference between the first and second approach is that with the second one there is no false positive if “undefined” is passed for “h”. > var i,t=document.getElementById(tid); > for(i=0;i t.rows[i].cells[c-1].style.display=h?"none":"table-cell"; t.rows[i].cells[c-1].style.display = h ? "none" : ""; Setting the value of a style property to the empty string resets it to its initial value. > } > […] -- PointedEars Twitter: @PointedEars2 Please do not Cc: me. / Bitte keine Kopien per E-Mail.