Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.teledata-fn.de!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="UTF-8" Message-ID: <3472582.Dlcafe6zmb@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Sat, 21 Apr 2012 20:59:50 +0200 User-Agent: KNode/4.4.11 Content-Transfer-Encoding: 8Bit Subject: Re: jquery ,get the id of the input in order to delete input row? Newsgroups: comp.lang.javascript References: <94ebf0a1-856f-4357-b689-2622f641bb10@h10g2000pbi.googlegroups.com> <4f92ea86$0$2792$a8266bb1@newsreader.readnews.com> Followup-To: comp.lang.javascript MIME-Version: 1.0 Lines: 60 NNTP-Posting-Date: 21 Apr 2012 20:59:51 CEST NNTP-Posting-Host: cefd6089.newsspool4.arcor-online.net X-Trace: DXC=4bMCoTG5>;gfF8a^:6>b7e4IUKK`fQ>EOE\[m`kB@oe2gG2=7` X-Complaints-To: usenet-abuse@arcor.de Xref: csiph.com comp.lang.javascript:13513 Matt McDonald wrote: > On 12-04-21 11:12 AM, Denis McMahon wrote: >> OP used xhtml style markup. Leaving aside whether anyone should be >> generating new pages in xhtml nowadays, does xhtml allow script elements >> in the document body? > > The doctype being used is the HTML 5 doctype, which allows both > X(HT)ML[0]¹ and HTML syntax[1]. > > […] > ¹ hat-tip to Thomas Lahn for the notation Thanks, but HTML5 will perhaps not allow XML syntax as it is not perhaps going to be¹ SGML-based. An "XHTML syntax of HTML5" has been specified, but it has very little to do with XML or XHTML. IMHO, HTML5 is a caricature of XHTML. >> Surely the proper way to signal "document loaded" is to define an onload >> event handler for the body element? > > The `onload` attribute of the `` element listens for the > `load` event[2]. This is the same event that the `onload` property > of the `window` object listens for. As has been observed, this > approach leaves the author (and user) hostage to images, that > when sufficiently large, take a long time to load. Here's what [2] > has written regarding the `load` event: > > > A user agent must dispatch this event when the DOM > > implementation finishes loading the resource > > (such as the document) **and any dependent resources > > (such as images, style sheets, or scripts)**. Dependent > > resources that fail to load must not prevent this event from > > firing if the resource that loaded them is still accessible via > > the DOM. If this event type is dispatched, implementations are > > required to dispatch this event at least on the Document node. > > [0]: > http://www.whatwg.org/specs/web-apps/current-work/multipage/#auto-toc-13 > [1]: > http://www.whatwg.org/specs/web-apps/current-work/multipage/#auto-toc-12 > [2]: http://www.w3.org/TR/DOM-Level-3-Events/#event-type-load But this is not always implemented so. Furthermore, jQuery interferes with it. The sad truth is that once you are using jQuery, you are condemned to use $(…) even for the equivalent of the `load' event listener. BTDT. Ceterum censeo jQuerynem esse delendam.² PointedEars ___________ ¹ remember that HTML5 is likely to become the longest lasting Working Draft in W3C history ² CMIIW -- Anyone who slaps a 'this page is best viewed with Browser X' label on a Web page appears to be yearning for the bad old days, before the Web, when you had very little chance of reading a document written on another computer, another word processor, or another network. -- Tim Berners-Lee