can't find error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Richard

    #1

    can't find error

    Latest news coverage, email, free stock quotes, live scores and video are just the beginning. Discover more every day at Yahoo!


    Was finally able to dress up the coding the way I like it.
    But my editor keeps reporting an error on the page.
    "line 42....object required".
    Regardless of what line 42 contains.

    Otherwise, the page actually validates.

    If you can figure out the error, let me know please.



  • Randy Webb

    #2
    Re: can't find error

    Richard wrote:
    [color=blue]
    > http://geocities.com/r_bullis/test4.html
    >
    > Was finally able to dress up the coding the way I like it.
    > But my editor keeps reporting an error on the page.
    > "line 42....object required".
    > Regardless of what line 42 contains.
    >
    > Otherwise, the page actually validates.
    >
    > If you can figure out the error, let me know please.[/color]

    Mozilla:

    Error: dw_scrollObj is not defined
    Source File: http://geocities.com/r_bullis/js/dw_hoverscroll.js
    Line: 12

    Fix that error first, then follow the errors that Mozilla reports. Then
    you can test it in IE. IE is well known to be the worse possible browser
    to test pages in.

    --
    Randy
    comp.lang.javas cript FAQ - http://jibbering.com/faq

    Comment

    • Richard

      #3
      Re: can't find error


      "Richard" <Anonymous@127. 001> wrote in message
      news:cq1uso02s2 d@news3.newsguy .com...[color=blue]
      > http://geocities.com/r_bullis/test4.html
      >
      > Was finally able to dress up the coding the way I like it.
      > But my editor keeps reporting an error on the page.
      > "line 42....object required".
      > Regardless of what line 42 contains.
      >
      > Otherwise, the page actually validates.
      >
      > If you can figure out the error, let me know please.
      >
      >[/color]


      In IE 6 the page renders nearly correct.
      There is a gap between the menu sidebar and the scrolling table.
      In Firefox, the page renders as it should.
      In Netscape 7.2 the layers don't even show up in the table, but show up
      elsewhere as they should.



      Comment

      • Laurent Bugnion

        #4
        Re: can't find error

        Hi,

        Randy Webb wrote:
        [color=blue]
        > Richard wrote:
        >[color=green]
        >> http://geocities.com/r_bullis/test4.html
        >>
        >> Was finally able to dress up the coding the way I like it.
        >> But my editor keeps reporting an error on the page.
        >> "line 42....object required".
        >> Regardless of what line 42 contains.
        >>
        >> Otherwise, the page actually validates.
        >>
        >> If you can figure out the error, let me know please.[/color]
        >
        >
        > Mozilla:
        >
        > Error: dw_scrollObj is not defined
        > Source File: http://geocities.com/r_bullis/js/dw_hoverscroll.js
        > Line: 12
        >
        > Fix that error first, then follow the errors that Mozilla reports. Then
        > you can test it in IE. IE is well known to be the worse possible browser
        > to test pages in.[/color]

        Totally true, except if you have Visual Studio .NET installed. Then,
        when an error occurs, you have the option to open the page in Studio's
        script debugger, which is pretty good. I used to like only Venkman until
        now, but after having spent almost one year programming JavaScript for
        IE, I got to say that it's handy to have both client-side and
        server-side debugged in the same debugger.

        Laurent
        --
        Laurent Bugnion, GalaSoft
        Software engineering: http://www.galasoft-LB.ch
        Private/Malaysia: http://mypage.bluewin.ch/lbugnion
        Support children in Calcutta: http://www.calcutta-espoir.ch

        Comment

        • Richard

          #5
          Re: can't find error


          "Randy Webb" <HikksNotAtHome @aol.com> wrote in message
          news:T-6dnVqPRsySG1ncR Vn-sw@comcast.com. ..[color=blue]
          > Richard wrote:
          >[color=green]
          > > http://geocities.com/r_bullis/test4.html
          > >
          > > Was finally able to dress up the coding the way I like it.
          > > But my editor keeps reporting an error on the page.
          > > "line 42....object required".
          > > Regardless of what line 42 contains.
          > >
          > > Otherwise, the page actually validates.
          > >
          > > If you can figure out the error, let me know please.[/color]
          >
          > Mozilla:
          >
          > Error: dw_scrollObj is not defined
          > Source File: http://geocities.com/r_bullis/js/dw_hoverscroll.js
          > Line: 12
          >
          > Fix that error first, then follow the errors that Mozilla reports. Then
          > you can test it in IE. IE is well known to be the worse possible browser
          > to test pages in.
          >[/color]

          Thanks. I'll look into it. Maybe the file got corrupted or something.
          But the source file is online. I double checked to make sure.
          Works fine in firefox.


          Comment

          • Ralph 'rkhb' Bauer

            #6
            Re: can't find error

            Richard schrieb:[color=blue]
            > http://geocities.com/r_bullis/test4.html[/color]
            [color=blue]
            > Was finally able to dress up the coding the way I like it.
            > But my editor keeps reporting an error on the page.
            > "line 42....object required".
            > Regardless of what line 42 contains.[/color]

            OK. I told you bullshit. Remove line 40. The problem is that the original
            program shows the content of "lyr1", while you want to hide it. So you have to
            hide it again at the end of the initial function "initScrollLaye r()". Insert a
            new line into this function between "dw_scrollObj.. ." and "}" (i.e. create a new
            line 38):

            document.getEle mentById('lyr1' ).style.visibil ity = 'hidden';

            viele grüße
            ralph

            Comment

            • Richard

              #7
              Re: can't find error

              Richard wrote:
              [color=blue]
              > http://geocities.com/r_bullis/test4.html[/color]
              [color=blue]
              > Was finally able to dress up the coding the way I like it.
              > But my editor keeps reporting an error on the page.
              > "line 42....object required".
              > Regardless of what line 42 contains.[/color]
              [color=blue]
              > Otherwise, the page actually validates.[/color]
              [color=blue]
              > If you can figure out the error, let me know please.[/color]


              The firefox js console reports:
              error: lyr has no properties.

              lyr is the variable used to show which "layer" is being applied.

              Don't understand this at all.



              Comment

              • Richard

                #8
                Re: can't find error

                Ralph 'rkhb' Bauer wrote:
                [color=blue]
                > Richard schrieb:[color=green]
                >> http://geocities.com/r_bullis/test4.html[/color][/color]
                [color=blue][color=green]
                >> Was finally able to dress up the coding the way I like it.
                >> But my editor keeps reporting an error on the page.
                >> "line 42....object required".
                >> Regardless of what line 42 contains.[/color][/color]
                [color=blue]
                > OK. I told you bullshit. Remove line 40. The problem is that the original
                > program shows the content of "lyr1", while you want to hide it. So you
                > have to hide it again at the end of the initial function
                > "initScrollLaye r()". Insert a new line into this function between
                > "dw_scrollObj.. ." and "}" (i.e. create a new line 38):[/color]
                [color=blue]
                > document.getEle mentById('lyr1' ).style.visibil ity = 'hidden';[/color]
                [color=blue]
                > viele grüße
                > ralph[/color]


                The only other thing that MIGHT be causing the error is that I have the
                layer links outside of a table.
                Because when inside of a table, I get no errors.
                Don't know why, But if it has to be that way, so be it.




                Comment

                • Laurent Bugnion

                  #9
                  Re: can't find error

                  Hi,

                  Richard wrote:
                  [color=blue]
                  > Richard wrote:
                  >
                  >[color=green]
                  >>http://geocities.com/r_bullis/test4.html[/color]
                  >
                  >[color=green]
                  >>Was finally able to dress up the coding the way I like it.
                  >>But my editor keeps reporting an error on the page.
                  >>"line 42....object required".
                  >>Regardless of what line 42 contains.[/color]
                  >
                  >[color=green]
                  >>Otherwise, the page actually validates.[/color]
                  >
                  >[color=green]
                  >>If you can figure out the error, let me know please.[/color]
                  >
                  >
                  >
                  > The firefox js console reports:
                  > error: lyr has no properties.
                  >
                  > lyr is the variable used to show which "layer" is being applied.
                  >
                  > Don't understand this at all.[/color]

                  This usually means that the variable lyr was not initialized (that it is
                  "undefined" or "null". It is empty, has no properties. It's the same
                  meaning that "object required", only expressed a bit differently.

                  You should debug your code, observe this lyr variable, and find out why
                  it's not initialized.

                  Typically, this could happen if you do something like:

                  var lyr = document.getEle mentById( "someId" );

                  and that no element in the document has this ID. Then the variable would
                  be null.

                  Laurent
                  --
                  Laurent Bugnion, GalaSoft
                  Software engineering: http://www.galasoft-LB.ch
                  Private/Malaysia: http://mypage.bluewin.ch/lbugnion
                  Support children in Calcutta: http://www.calcutta-espoir.ch

                  Comment

                  Working...