Anybody knows a working JavaScript replaceNode() example?

Discussion in 'Web Design and Development' started by c-Row, May 28, 2007.

  1. c-Row macrumors 65816

    c-Row

    Joined:
    Jan 10, 2006
    Location:
    Germany
    #1
    I'm currently working on a inline editor for our current homepage, but I just can't get replaceNode() to work... nor can I find any working examples online. appendChild() works fine, but replaceNode() would be far better.

    Maybe someone could point me in a right, working direction?



    [edit] OK... looks like replaceNode() does NOT work on Mac, no matter what browser you use.
     
  2. epochblue macrumors 68000

    epochblue

    Joined:
    Aug 12, 2005
    Location:
    Nashville, TN
    #2
    Are you using any kind of JS toolkit/library? Chances are, one of those toolkits will abstract you away from the DOM a little and give you all this functionality that you want without you having to deal directly with browser/OS differences.

    Me? I like jQuery, but a lot of the world seems to love Prototype.
     
  3. c-Row thread starter macrumors 65816

    c-Row

    Joined:
    Jan 10, 2006
    Location:
    Germany
    #3
    Prototype seems to do the trick - there is a nice and slim example on 24ways.org.

    Thanks for the suggestion. :)
     

Share This Page