Path: csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="UTF-8" Message-ID: <1660368.mReO0LyTN9@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Mon, 12 Nov 2012 11:49:08 +0100 User-Agent: KNode/4.4.11 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+&. Followup-To: comp.lang.javascript MIME-Version: 1.0 Lines: 104 NNTP-Posting-Date: 12 Nov 2012 11:49:11 CET NNTP-Posting-Host: 82c7f8f3.newsspool1.arcor-online.net X-Trace: DXC=OMPh`G_TLba^Y=RbYBPl4`ic==]BZ:afn4Fo<]lROoRankgeX?EC@@`59mb1gI=;^iDZm8W4\YJNlJ`:FmdeL>K`XB;PldmT3:cjgDmXkF1cbk X-Complaints-To: usenet-abuse@arcor.de Xref: csiph.com comp.lang.javascript:17188 Gregor Kofler wrote: > Am 2012-11-11 17:28, dmn2004404@gmail.com meinte: > > [snip] > >> >> This line is meaningless in XHTML unless parsed as text/html. The XHTML document has to be well-formed before this line is parsed. >> Untitled Document Pardon? >> or do not declare, and do not use XHTML. >> shippingAndHandling = 1.50; >> else >> shippingAndHandling = purchasePrice * .10; >> totalCost = purchasePrice + shippingAndHandling; >> window.alert('Purchase price plus shipping and handling is $' + >> totalCost); } window.alert() should not be used to convey purely informational messages. >> >> > >> For the record, I've also tried changing "txtPurchasePrice.value" to >> "document.getElementById('txtPurchasePrice').value" > > Depends *when* you try to reference the element. And with unqualified references on which rendering mode is used. PointedEars -- Prototype.js was written by people who don't know javascript for people who don't know javascript. People who don't know javascript are not the best source of advice on designing systems that use javascript. -- Richard Cornford, cljs,