SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Addict
    Join Date
    Jan 2001
    Location
    Ottawa ON
    Posts
    315
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    A ready-made cross-platform JavaScript to insert nodes into a document?

    I want to use Javascript to insert a node into a document.

    In a form, I have a series of <input> tags. I want users to be able to click a button to add additional tags to the page.

    I know how to do this using ECMAScript and the DOM. But I don't know the first thing about Netscape4. And I'd prefer not to have to spend any time playing around with IE4/5 to get it working in those browsers.

    Somebody out there must have produced a cross-platform, ready-made, function to insert nodes/text into a document.

    Short of that, does anybody know of a ready-made script to approximate what I want. I'm specificalyl concerned about Netscape4 since I've never learned its DOM.

  2. #2
    Perl/Mason Guru Flawless_koder's Avatar
    Join Date
    Feb 2002
    Location
    Gatwick, UK
    Posts
    1,206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm fairly sure Netscape will support the appendChild method.

    Flawless
    ---=| If you're going to buy a pet - get a Shetland Giraffe |=---

  3. #3
    SitePoint Addict
    Join Date
    Jan 2001
    Location
    Ottawa ON
    Posts
    315
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okay. In the case, if Netscape4 has some similarities to the w3c DOM, could you point me to a reference on how to access elements in Netscape4? i.e. what's the equivalent of document.getElementById and docuemnt.all?

  4. #4
    What? Maelstrom's Avatar
    Join Date
    Oct 2001
    Location
    Whistler BC originally from Guelph Ontario
    Posts
    2,175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    For netscape specific reference to javascript try the source

    http://developer.netscape.com/docs/m...sref/index.htm


    Here is a bunch of links that may help

    http://search.netscape.com/search.ps...ript+reference

    As for specifics the equiv to document.all is document.layers (for layers)...otherwise I haven't coded for nn4.7 is a long time.
    Maelstrom Personal - Apparition Visions
    Development - PhP || Mysql || Zend || Devshed
    Unix - FreeBSD || FreeBsdForums || Man Pages
    They made me a sitepoint Mentor - Feel free to PM me or Email me and I will see if I can help.

  5. #5
    SitePoint Addict
    Join Date
    Jan 2001
    Location
    Ottawa ON
    Posts
    315
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the references. Hopefully, I'll be able to get away without implementing Netscape4 support (I'm asking the client to move to Netscape6 for the intranet). But in the unfortunate event that I have to implement it, those (pretty good) references will certainly come in handy.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •