Which browser supports cloneNode and appendChild ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • NKTA
    New Member
    • Jan 2010
    • 26

    #1

    Which browser supports cloneNode and appendChild ?

    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 ?
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    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)

    Comment

    • NKTA
      New Member
      • Jan 2010
      • 26

      #3
      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

      Comment

      • Dormilich
        Recognized Expert Expert
        • Aug 2008
        • 8694

        #4
        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.

        Comment

        • NKTA
          New Member
          • Jan 2010
          • 26

          #5
          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.

          Comment

          • Dormilich
            Recognized Expert Expert
            • Aug 2008
            • 8694

            #6
            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.

            Comment

            • NKTA
              New Member
              • Jan 2010
              • 26

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


              One good thing was:

              Code:
              file://localhost/C:/..../QuestTeorico.html?Radio=2&nodeAction=on
              Error:
              name: TypeError
              message: Statement on line 102: Cannot convert undefined or null to Object
              stacktrace: n/a; see  opera:config#UserPrefs|Exceptions Have Stacktrace
              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.

              Comment

              • Dormilich
                Recognized Expert Expert
                • Aug 2008
                • 8694

                #8
                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.

                Comment

                Working...