'undefined' is null or not an object javascript

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • redog6@hotmail.com

    'undefined' is null or not an object javascript

    Hello
    I have the above javascript error on filling in mandatory fields and
    submitting the form below:



    This error only occurs in IE not firefox and I can't see anything
    wrong with the functioning of the form.

    I have been tearing my hair out on this one and would be very
    gratefulf for any help.
    All the best
    Redge
    P.S. Please reply to this group rather than by email - thanks.

  • Thomas 'PointedEars' Lahn

    #2
    Re: 'undefined' is null or not an object javascript

    redog6@hotmail. com wrote:
    I have the above javascript error on filling in mandatory fields and
    submitting the form below:
    >

    >
    This error only occurs in IE not firefox
    An error occurs in Firefox (2.0.0.8). Select the Tools menu, Error Console
    item (or whatever debugging tool you employ -- to http://getfirebug.com/ is
    strongly recommended.)
    P.S. Please reply to this group rather than by email - thanks.
    The opposite would be abnormal and generally unwished for in Usenet, so
    there is not really a need for asking for it in an OP. (Nevertheless, there
    must be an address in the From header, meaning it designates a container
    that receives e-mail; see RFC1036 and RFC2822.)


    PointedEars
    --
    realism: HTML 4.01 Strict
    evangelism: XHTML 1.0 Strict
    madness: XHTML 1.1 as application/xhtml+xml
    -- Bjoern Hoehrmann

    Comment

    • redog6@hotmail.com

      #3
      Re: 'undefined' is null or not an object javascript

      Apologies - I forgot to upload one file at the time I posted so the
      error response was not as described - it is now - please try it again
      and see if you can help me out - many thanks.

      Regards
      Redge.

      Comment

      • Thomas 'PointedEars' Lahn

        #4
        Re: 'undefined' is null or not an object javascript

        redog6@hotmail. com wrote:
        Apologies - I forgot to upload one file at the time I posted so the
        error response was not as described - it is now - please try it again
        and see if you can help me out - many thanks.
        Same error (uncached):

        urchinTracker is not defined

        Line: 248
        Code: urchinTracker() ;

        Since `urchinTracker' appears to be a method, that would be the explanation
        why IE shows the unhelpful "undefined is null or not an object" error
        message: `undefined' cannot be called.

        ISTM it is your using Google Analytics at the end of the `body' element (and
        possibly also your serving invalid markup -- <http://validator.w3.or g/>)
        that causes the problem. Incidentally, Google's client-side script code is
        recognized here to have been written by in[ae]pt people.


        PointedEars
        --
        Prototype.js was written by people who don't know javascript for people
        who don't know javascript. People who don't know javascript are not
        the best source of advice on designing systems that use javascript.
        -- Richard Cornford, cljs, <f806at$ail$1$8 300dec7@news.de mon.co.uk>

        Comment

        • redog6@hotmail.com

          #5
          Re: 'undefined' is null or not an object javascript

          Thanks for your advice Thomas...
          >
          ISTM it is your using Google Analytics at the end of the `body' element (and
          possibly also your serving invalid markup -- <http://validator.w3.or g/>)
          that causes the problem.
          Actually I have placed the Analytics tag exactly where Google say to
          put it and the validator code seems strict xhtml and I am not sure why
          it would create this error as other pages with transitional or loose
          syntax and also Analytics tags in the same place do not give the
          error... perhaps I am missing something here but I am still not sure
          how to progress.

          regards
          Redge

          Comment

          • Thomas 'PointedEars' Lahn

            #6
            Re: 'undefined' is null or not an object javascript

            [Quoting repaired]

            redog6@hotmail. com wrote:
            [Thomas 'PointedEars' Lahn wrote:]
            >ISTM it is your using Google Analytics at the end of the `body' element (and
            >possibly also your serving invalid markup -- <http://validator.w3.or g/>)
            >that causes the problem.
            >
            Actually I have placed the Analytics tag exactly where Google say to
            put it
            You misunderstood me. I did _not_ mean to say that the position of the
            "Analytics tag", which is rather a `script' element containing a call to
            Google Analytics code, was wrong. Mentioning the position was merely a way
            to point you directly to the line where the problem appears to occur.
            and the validator code seems strict xhtml
            Parse error. *Your* code is _not_ valid.



            shows 12 errors, and that is assuming HTML 4.01 Transitional because you
            omitted the required DOCTYPE declaration in your code.
            and I am not sure why it would create this error as other pages with
            transitional or loose syntax and also Analytics tags in the same place
            do not give the error...
            Would that not be an indication that Google Analytics, at least the way you
            used it, does not work with XHTML?
            perhaps I am missing something here but I am still not sure how to progress.
            Use Valid HTML 4.01, preferably Strict.


            Please take heed on the FAQ on how to quote properly:



            PointedEars
            --
            "Use any version of Microsoft Frontpage to create your site. (This won't
            prevent people from viewing your source, but no one will want to steal it.)"
            -- from <http://www.vortex-webdesign.com/help/hidesource.htm>

            Comment

            • redog6@hotmail.com

              #7
              Re: 'undefined' is null or not an object javascript

              I have now updated the page to conform to valid html 4.0 Transitional
              but the error still persists.

              Comment

              • Evertjan.

                #8
                Re: 'undefined' is null or not an object javascript

                wrote on 25 okt 2007 in comp.lang.javas cript:
                I have now updated the page to conform to valid html 4.0 Transitional
                but the error still persists.
                What error?

                [please always quote on usenet, this is not email]


                --
                Evertjan.
                The Netherlands.
                (Please change the x'es to dots in my emailaddress)

                Comment

                • redog6@hotmail.com

                  #9
                  Re: 'undefined' is null or not an object javascript

                  On 25 Oct, 22:01, "Evertjan." <exjxw.hannivo. ..@interxnl.net wrote:
                  wrote on 25 okt 2007 in comp.lang.javas cript:
                  >
                  I have now updated the page to conform to valid html 4.0 Transitional
                  but the error still persists.
                  >
                  What error?
                  >
                  [please always quote on usenet, this is not email]
                  >
                  --
                  Evertjan.
                  The Netherlands.
                  (Please change the x'es to dots in my emailaddress)
                  Sorry, I was talking about the original error "'undefined ' is null or
                  not an object". I have taken earlier advice which suggested that the
                  Javascript for my Google analytics combined with invalid mark up may
                  have been causing the error but although it may relate to another
                  error on validating the page and even removing the Analytics
                  javascript the "'undefined ' is null or not an object" error still
                  persists. I am not surprised since other pages with the same invalid
                  markup and Analytics tags do not produce the error.

                  Comment

                  • pr

                    #10
                    Re: 'undefined' is null or not an object javascript

                    redog6@hotmail. com wrote:
                    >
                    Sorry, I was talking about the original error "'undefined ' is null or
                    not an object". I have taken earlier advice which suggested that the
                    Javascript for my Google analytics combined with invalid mark up may
                    have been causing the error but although it may relate to another
                    error on validating the page and even removing the Analytics
                    javascript the "'undefined ' is null or not an object" error still
                    persists. I am not surprised since other pages with the same invalid
                    markup and Analytics tags do not produce the error.
                    >
                    Looks like vvouchertype.va lue to me.



                    shows you how to retrieve radio button values. Since the value of the
                    checked item is in the HTML, it's a puzzle as to why you should be
                    trying to trim it in any case.

                    I agree with David on the code quality: it's not a very obscure bug and
                    it's a worry that it takes so long to pinpoint it.

                    Comment

                    • Thomas 'PointedEars' Lahn

                      #11
                      Re: 'undefined' is null or not an object javascript

                      On 25 Oct, 22:01, "Evertjan." <exjxw.hannivo. ..@interxnl.net wrote:
                      >[please always quote on usenet, this is not email]
                      JFTR: Quoting is useful with e-mail, too.


                      PointedEars

                      Comment

                      • redog6@hotmail.com

                        #12
                        Re: 'undefined' is null or not an object javascript

                        On 26 Oct, 12:25, pr <p...@porl.glob alnet.co.ukwrot e:
                        red...@hotmail. com wrote:
                        >
                        Sorry, I was talking about the original error "'undefined ' is null or
                        not an object". I have taken earlier advice which suggested that the
                        Javascript for my Google analytics combined with invalid mark up may
                        have been causing the error but although it may relate to another
                        error on validating the page and even removing the Analytics
                        javascript the "'undefined ' is null or not an object" error still
                        persists. I am not surprised since other pages with the same invalid
                        markup and Analytics tags do not produce the error.
                        >
                        Looks like vvouchertype.va lue to me.
                        >

                        >
                        shows you how to retrieve radio button values. Since the value of the
                        checked item is in the HTML, it's a puzzle as to why you should be
                        trying to trim it in any case.
                        >
                        I agree with David on the code quality: it's not a very obscure bug and
                        it's a worry that it takes so long to pinpoint it.
                        Many thanks and also to David for your constructive comments - that
                        has solved the problem.

                        Comment

                        Working...