Welcome to WebHeadStart.org

Web Technologies

Sponsored By

WebHeadStart.org is currently in beta.
Please pardon our appearance as we work to provide you with the most comprehensive reference on today's web technologies.

Interested in advertising on WebHeadStart? Become an advertising partner today!

[WWW-HTML Mailing List Archive Home] [Messages By Thread] [Messages By Date]

Re: xhtml and javascript

From: Brian Bober <netdemonz@yahoo.com>
Date: Sat, 28 Jun 2003 15:40:42 -0700 (PDT)
Message-ID: <20030628224042.96107.qmail@web11705.mail.yahoo.com>
To: "www-html@w3.org" <www-html@w3.org>

Hixie: As I mentioned before, createElementNS (or createElement for HTML) works
fine for a small block of markup, but what if you want to put in a huge block
without doing node insertion? Is DOM version 3 going to have some kind of
reasonable replacement for something on the lines of innerHTML (but also
available for XML)?

--- Ian Hickson <ian@hixie.ch> wrote:
> 
> On Sat, 28 Jun 2003, Tom Gilder wrote:
> >
> > You could of course use the DOM to generate the checkbox, but you'd
> > have to wait for onload to fire, which is a bad thing
> 
> You shouldn't need to:
> 
>    <div id="hook"></div>
>    <script type="application/x-javascript">
>      /* in an XHTML document this would have to use createElementNS(), not
>         createElement(), but that's another story */
>      var element = document.createElement('INPUT');
>      element.onclick = function() { ... };
>      // etc...
>      document.getElementById('hook').appendChild(element);
>    </script>
> 
> (The above might need some tweaks to work in legacy UAs like Windows IE6,
> but the basic principle should work in any UA with DOM1 support.)
> 
> -- 
> Ian Hickson                                      )\._.,--....,'``.    fL
> "meow"                                          /,   _.. \   _\  ;`._ ,.
> http://index.hixie.ch/                          `._.-(,_..'--(,_..'`-.;.'
> 


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com 
Received on Saturday, 28 June 2003 18:40:43 GMT
Valid XHTML 1.0! Valid CSS! Site Map | Privacy Policy | Terms of Use | WebHeadStart.org © 2005 All Rights Reserved.