crenner
05-10-2005, 06:50 AM
I'm working on a script to duplicate a node, inserting the new node after the old. It works just fine in Firefox, but i'm getting inexplicable errors in Safari and IE.
http://www.rserv.info/misc/dupetest.html
Everything I read indicates that the parentNode property works in all major browers, but IE/mac gives me an error "Object doesn't support this property or method" on "parent = toDupe.parentNode;"
safari doesn't mind that line, but says "value undefined (result of expression parent.replaceChild) is not object" on the replaceChild call.
I can't understand why this would work just fine in Firefox, but not in any other browser. Any ideas?
http://www.rserv.info/misc/dupetest.html
Everything I read indicates that the parentNode property works in all major browers, but IE/mac gives me an error "Object doesn't support this property or method" on "parent = toDupe.parentNode;"
safari doesn't mind that line, but says "value undefined (result of expression parent.replaceChild) is not object" on the replaceChild call.
I can't understand why this would work just fine in Firefox, but not in any other browser. Any ideas?