Question:
Does Netscape Navigator 4.5 offer a function similar to Internet Explorer’s createElement? I’d like to add an option to a
Answer:
Netscape Navigator does not have a direct equivalent to IE’s createElement because it doesn’t support the notion of creating elements on the fly. SELECTs are especially problematic, since there’s no clean way to add HTML within a SELECT region. The closest that you could manage would be to create a layer, then use JavaScript arrays to maintain the OPTIONs available within a SELECT statement. In this example, every time you press a button, it causes the contents of the listbox to expand by one programming language:
Untitled This is a test.
Note that I've created a layer to handle the expansion. In order to display the SELECT, you need to make sure that you surround the text buffer with a
element, or Netscape won't know what to do with the text that you're introducing.