innerHTML alternative?


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: innerHTML alternative?

  1. #1
    Chopin Guest

    innerHTML alternative?


    Netscape techies! What's the corresponging to IE's innerHTML? For example
    creating a listbox dynamically.

    In IE:

    x.innerHTML='<SELECT><OPTION name=optX></OPTION></SELECT>';

    What in Netscape?

    OOP is not an answer I cannot use createElements and addChild funcions, because
    they are **** slow.

    For a listbox with 2000 elements it may be 30 seconds instead of 1.

    Any suggestion?

  2. #2
    Matthew Solnit Guest

    Re: innerHTML alternative?

    "Chopin" <chopinke@hotmail.com> wrote in message news:3cb62107$1@10.1.10.29...
    >
    > OOP is not an answer I cannot use createElements and addChild funcions,

    because
    > they are **** slow.
    >
    > For a listbox with 2000 elements it may be 30 seconds instead of 1.


    If it helps, you can try this (which works in IE, dunno about Netscape):

    listbox.options.length = 2000

    This automatically creates the items, then you can just loop through and fill in
    the properties. May be faster than calling createElement() 2000 times.

    -- Matthew Solnit



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center