Connect with Expertise | Find Experts, Get Answers, Share Insights

Which browser supports cloneNode and appendChild ?

 
Join Date: Jan 2010
Posts: 26
#1: Jan 29 '10
Hi again.

I'm builting a multiple choice form, all dinamic, allowing users in the firts dinamic space to specify how many questions for mulitple choice they want, and a button to add them, so therefore as soon button is clicked the choices appear and a checkbox plus a textarea appears to fill.
My problem is, it works perfectly in IE8 and mozila and opera doesn't even work.

Been searching on the web, it maybe because i'm using the methods:
- cloneNode()
& appendChild();

Is this true, to support these browsers i need to find another way withous using these methods ?
Why haven't they supported, is there any serious disadvantage ?

✓ answered by Dormilich

any decent code editor with sufficient code highlighting will do. to track down the problem, use Opera’s developer extension (Dragonfly) and the JavaScript Error Console.

Dormilich's Avatar
E
M
C
 
Join Date: Aug 2008
Location: Leipzig, Germany
Posts: 5,372
#2: Jan 29 '10

re: Which browser supports cloneNode and appendChild ?


My problem is, it works perfectly in IE8 and mozila and opera doesn't even work.
then I guess it’s a problem within your code somewhere else, afaik Opera does support the DOM (even more than IE)
 
Join Date: Jan 2010
Posts: 26
#3: Jan 29 '10

re: Which browser supports cloneNode and appendChild ?


Thx for answering.
In that case, i will have to review all the code i have.
I'm using Antechinus Javascript Editor, is there any software better to use ? That atleast spots these errors in coding.

BR
Dormilich's Avatar
E
M
C
 
Join Date: Aug 2008
Location: Leipzig, Germany
Posts: 5,372
#4: Jan 29 '10

re: Which browser supports cloneNode and appendChild ?


any decent code editor with sufficient code highlighting will do. to track down the problem, use Opera’s developer extension (Dragonfly) and the JavaScript Error Console.
 
Join Date: Jan 2010
Posts: 26
#5: Jan 29 '10

re: Which browser supports cloneNode and appendChild ?


My favorite brwoser is opera, and i had it all the time (DragonFly) and didn't know !
Regarding Firefox i'm using FireBug.

But still i'm a beginner on this, it will take a while untill take full potential of it,.
But thank you for the tips.
Dormilich's Avatar
E
M
C
 
Join Date: Aug 2008
Location: Leipzig, Germany
Posts: 5,372
#6: Jan 29 '10

re: Which browser supports cloneNode and appendChild ?


yea, Firefox is the only one that doesn’t come with built-in developer tools (but since there is FireBug, why should it …) and never forget the Error Console, that should be the first place to look.
 
Join Date: Jan 2010
Posts: 26
#7: Jan 29 '10

re: Which browser supports cloneNode and appendChild ?


Well, i'm using dragonfly right now,and the only error that appears is:
Expand|Select|Wrap|Line Numbers
  1.  
  2. file://.../QuestTeorico.html    ?    Unhandled exception: [Object DOMException]
  3. file://localhost/..../QuestTeorico.html
  4. Unhandled exception: [Object DOMException]
  5. name: Error
  6. message: INVALID_CHARACTER_ERR
  7. stacktrace: n/a; see  opera:config#UserPrefs|Exceptions Have Stacktrace
  8.  
Would appreciate if ya could translate it.


One good thing was:

Expand|Select|Wrap|Line Numbers
  1. file://localhost/C:/..../QuestTeorico.html?Radio=2&nodeAction=on
  2. Error:
  3. name: TypeError
  4. message: Statement on line 102: Cannot convert undefined or null to Object
  5. stacktrace: n/a; see  opera:config#UserPrefs|Exceptions Have Stacktrace
  6.  
Just added an if to ensure that if it was null, didn't proceed. So this error was fixed. But remaining critical error still haven't fixed.
Dormilich's Avatar
E
M
C
 
Join Date: Aug 2008
Location: Leipzig, Germany
Posts: 5,372
#8: Jan 29 '10

re: Which browser supports cloneNode and appendChild ?


there is somewhere an Exception thrown, which is not caught. from the looks of it, it comes from a DOM method and its input parameter is wrong.
Reply

Tags
appendchild(), clonenode(), firefox, ie8, support