Error in page

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

    #1

    Error in page

    Hello,

    I wrote a javascript,
    and when I open the html by the browser,
    I get the message : Error in page.

    It is about tousand lines, and I cannot figure out in a simple way,
    where is the line, that cause the error ?

    I see on other computers, a message like " ... do you wish to debug".

    Is there any way just knowing where is the line that cause the error ?

    Is there anywhere in the internet a free validator for checking java script
    code ?

    Thanks :)


  • kaeli

    #2
    Re: Error in page

    In article <3fb3e05b$1@new s.012.net.il>, a@b.com enlightened us with...[color=blue]
    > I wrote a javascript,
    > and when I open the html by the browser,
    > I get the message : Error in page.
    >
    > It is about tousand lines, and I cannot figure out in a simple way,
    > where is the line, that cause the error ?
    >
    > I see on other computers, a message like " ... do you wish to debug".
    >
    > Is there any way just knowing where is the line that cause the error ?
    >
    > Is there anywhere in the internet a free validator for checking java script
    > code ?
    >[/color]


    IE is terrible for debugging, even when the settings are checked for it.
    Bring up the page in Netscape 6+ or Mozilla, then type
    javascript:
    in the location bar and hit enter for the javascript console.
    The error should be more apparent.

    If you post a link, we could look at the page.


    --
    ~kaeli~
    Every calendar's days are numbered.



    Comment

    • Mr. x

      #3
      Re: Error in page

      Thanks,

      Isn't any simple way not using Mozila or Netscape ?
      (Most of the users that enter into my site, use IE 5.5 or greater,
      but I want to use the explorer which is much like IE 5.5 - what is it ?
      Mozila or NetScape ?
      Besides, I am for sure show in the past that in IE 5.5 and greater, with
      an error on it -
      the browser shout that I have error in my page, and which line has the
      error, I don't remember how,
      - That's all I want, since my program is hardly debugged).

      The site is in Hebrew, so I don't know if you'll understand some,
      If you really curious it is : www.moca.co.il,
      but there are more :
      I want to debug not just java-scripts, but asmx (VBNET), aspx, htmls, and
      every kind of protocol that I use to build my site
      (and beleive me, there are a lot of protocols).

      Thanks :)

      "kaeli" <tiny_one@NOSPA M.comcast.net> wrote in message
      news:MPG.1a1d9f 864138058398996 6@nntp.lucent.c om...[color=blue]
      > In article <3fb3e05b$1@new s.012.net.il>, a@b.com enlightened us with...[color=green]
      > > I wrote a javascript,
      > > and when I open the html by the browser,
      > > I get the message : Error in page.
      > >
      > > It is about tousand lines, and I cannot figure out in a simple way,
      > > where is the line, that cause the error ?
      > >
      > > I see on other computers, a message like " ... do you wish to debug".
      > >
      > > Is there any way just knowing where is the line that cause the error ?
      > >
      > > Is there anywhere in the internet a free validator for checking java[/color][/color]
      script[color=blue][color=green]
      > > code ?
      > >[/color]
      >
      >
      > IE is terrible for debugging, even when the settings are checked for it.
      > Bring up the page in Netscape 6+ or Mozilla, then type
      > javascript:
      > in the location bar and hit enter for the javascript console.
      > The error should be more apparent.
      >
      > If you post a link, we could look at the page.
      >
      >
      > --
      > ~kaeli~
      > Every calendar's days are numbered.
      > http://www.ipwebdesign.net/wildAtHeart
      > http://www.ipwebdesign.net/kaelisSpace
      >[/color]


      Comment

      • kaeli

        #4
        Re: Error in page

        In article <3fb3f0f9@news. 012.net.il>, a@b.com enlightened us with...[color=blue]
        > Thanks,
        >
        > Isn't any simple way not using Mozila or Netscape ?[/color]

        Not really, no.
        There was a thread some time ago about javascript debuggers. The
        consensus, IIRC, was that Venkman was the way to go, and that's Mozilla
        open source (and netscape).
        Dreamweaver has a JS debugger, too, I think.
        [color=blue]
        > (Most of the users that enter into my site, use IE 5.5 or greater,
        > but I want to use the explorer which is much like IE 5.5 - what is it ?[/color]

        Mozilla and Netscape are very similar. They are nothing like IE, since
        IE supports proprietary code that they don't.
        Netscape 6+ is based on Mozilla code.
        [color=blue]
        > Mozila or NetScape ?
        > Besides, I am for sure show in the past that in IE 5.5 and greater, with
        > an error on it -
        > the browser shout that I have error in my page, and which line has the
        > error, I don't remember how,[/color]

        The line number is rarely accurate.
        It's in the settings, advanced tab, I think. I have IE6 and some things
        changed, so I'm not positive. There's checkboxes for error messages and
        whether to ignore errors and such.
        [color=blue]
        >
        > The site is in Hebrew, so I don't know if you'll understand some,
        > If you really curious it is : www.moca.co.il,[/color]

        Netscape immediately showed that you have a syntax error - a semi-colon
        after an if block.
        function checkExecOK(ign oreCount)
        {
        var res;
        res = false;
        if (gen_execWSCoun t == 0)
        res = true;
        else
        if (gen_innerCall)
        {
        gen_innerCall = false;
        res = true;
        }; <--- that doesn't belong there
        else
        res = false;
        if ((res == true) && (!(ignoreCount) ))
        gen_execWSCount = gen_execWSCount + 1;
        return res;
        }[color=blue]
        > but there are more :
        > I want to debug not just java-scripts, but asmx (VBNET), aspx, htmls, and[/color]

        html is not debugged. It is validated. There are some nice validator
        sites around.
        aspx and such is debugged with the tool you developed it with. Interdev
        has a nice debugger.

        HTH
        --
        ~kaeli~
        A plateau is a high form of flattery.



        Comment

        • Mr. x

          #5
          Re: Error in page

          I have installed Mozilla (1.5) and Netscape (7.1), and ...
          1) I don't get any error in my page - can you tell me how you got the error,
          please.
          Is there any validation of the current page ?
          2) Several things don't work (I don't see some my pictures on the main page,
          CSS for opacity:alpha .... - It seems that netscape ignore this
          behaviour.
          Web Service behaviour (htc) - doesn't seems to work.

          Thanks :)

          "kaeli" <tiny_one@NOSPA M.comcast.net> wrote in message
          news:MPG.1a1e9a 73e09d747989968 @nntp.lucent.co m...[color=blue]
          > In article <3fb3f0f9@news. 012.net.il>, a@b.com enlightened us with...[color=green]
          > > Thanks,
          > >
          > > Isn't any simple way not using Mozila or Netscape ?[/color]
          >
          > Not really, no.
          > There was a thread some time ago about javascript debuggers. The
          > consensus, IIRC, was that Venkman was the way to go, and that's Mozilla
          > open source (and netscape).
          > Dreamweaver has a JS debugger, too, I think.
          >[color=green]
          > > (Most of the users that enter into my site, use IE 5.5 or greater,
          > > but I want to use the explorer which is much like IE 5.5 - what is it ?[/color]
          >
          > Mozilla and Netscape are very similar. They are nothing like IE, since
          > IE supports proprietary code that they don't.
          > Netscape 6+ is based on Mozilla code.
          >[color=green]
          > > Mozila or NetScape ?
          > > Besides, I am for sure show in the past that in IE 5.5 and greater,[/color][/color]
          with[color=blue][color=green]
          > > an error on it -
          > > the browser shout that I have error in my page, and which line has the
          > > error, I don't remember how,[/color]
          >
          > The line number is rarely accurate.
          > It's in the settings, advanced tab, I think. I have IE6 and some things
          > changed, so I'm not positive. There's checkboxes for error messages and
          > whether to ignore errors and such.
          >[color=green]
          > >
          > > The site is in Hebrew, so I don't know if you'll understand some,
          > > If you really curious it is : www.moca.co.il,[/color]
          >
          > Netscape immediately showed that you have a syntax error - a semi-colon
          > after an if block.
          > function checkExecOK(ign oreCount)
          > {
          > var res;
          > res = false;
          > if (gen_execWSCoun t == 0)
          > res = true;
          > else
          > if (gen_innerCall)
          > {
          > gen_innerCall = false;
          > res = true;
          > }; <--- that doesn't belong there
          > else
          > res = false;
          > if ((res == true) && (!(ignoreCount) ))
          > gen_execWSCount = gen_execWSCount + 1;
          > return res;
          > }[color=green]
          > > but there are more :
          > > I want to debug not just java-scripts, but asmx (VBNET), aspx, htmls,[/color][/color]
          and[color=blue]
          >
          > html is not debugged. It is validated. There are some nice validator
          > sites around.
          > aspx and such is debugged with the tool you developed it with. Interdev
          > has a nice debugger.
          >
          > HTH
          > --
          > ~kaeli~
          > A plateau is a high form of flattery.
          > http://www.ipwebdesign.net/wildAtHeart
          > http://www.ipwebdesign.net/kaelisSpace
          >[/color]


          Comment

          • Lasse Reichstein Nielsen

            #6
            Re: Error in page

            "Mr. x" <a@b.com> writes:
            [color=blue]
            > I have installed Mozilla (1.5) and Netscape (7.1), and ...
            > 1) I don't get any error in my page - can you tell me how you got the error,
            > please.
            > Is there any validation of the current page ?[/color]

            The errors are reported in the javascript console. Open it through the
            menu, or enter "javascript :" in the location bar.
            [color=blue]
            > 2) Several things don't work (I don't see some my pictures on the main page,
            > CSS for opacity:alpha .... - It seems that netscape ignore this
            > behaviour.[/color]

            "opacity" is not part of a CSS specification yet. Therefore, the version
            Mozilla implements is prefixed with -moz- as the CSS specifications request.
            Example:
            -moz-opacity:0.5;
            The Microsoft proprietary "filter" rule is not supported by anything
            except IE, and it is how IE makes transparency.
            [color=blue]
            > Web Service behaviour (htc) - doesn't seems to work.[/color]

            Sounds like a Microsoft invention. I have never heard about it.
            (checking: yes it is).
            You should not expect anything but Microsoft's browser to support
            their own inventions.

            /L
            --
            Lasse Reichstein Nielsen - lrn@hotpop.com
            DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
            'Faith without judgement merely degrades the spirit divine.'

            Comment

            • Mr. x

              #7
              Re: Error in page

              Thanks,
              Several things.
              Since I new on mozilla/netscape :
              1) about the javascript console - I didn't find where (netscape/mozilla) ?
              2) For CSS - opacity - thanks for your reply.
              3) Is there any way to figure out what browser is running, and do different
              things for IE and for Mozilla/Netscape, so my page work on any browser ?
              4) About htc - I use it for web-service generally (htc behaviour file for
              web-services is a common file - services.htc) , and for some behaviour of
              components (like common styles and events for the same behaviour
              components).
              Web-Service will work, even the server side is java-based, because it
              doesn't metter what is on the server side - it is WDSL/SOAP
              (I did some check on server side : Tomcat, and it works at the same
              manner I do the checking for microsoft server),
              so I think there must be a way to get web-service work in
              netscape/mozilla.

              Thanks :)


              "Lasse Reichstein Nielsen" <lrn@hotpop.com > wrote in message
              news:d6buzcw6.f sf@hotpop.com.. .[color=blue]
              > "Mr. x" <a@b.com> writes:
              >[color=green]
              > > I have installed Mozilla (1.5) and Netscape (7.1), and ...
              > > 1) I don't get any error in my page - can you tell me how you got the[/color][/color]
              error,[color=blue][color=green]
              > > please.
              > > Is there any validation of the current page ?[/color]
              >
              > The errors are reported in the javascript console. Open it through the
              > menu, or enter "javascript :" in the location bar.
              >[color=green]
              > > 2) Several things don't work (I don't see some my pictures on the main[/color][/color]
              page,[color=blue][color=green]
              > > CSS for opacity:alpha .... - It seems that netscape ignore this
              > > behaviour.[/color]
              >
              > "opacity" is not part of a CSS specification yet. Therefore, the version
              > Mozilla implements is prefixed with -moz- as the CSS specifications[/color]
              request.[color=blue]
              > Example:
              > -moz-opacity:0.5;
              > The Microsoft proprietary "filter" rule is not supported by anything
              > except IE, and it is how IE makes transparency.
              >[color=green]
              > > Web Service behaviour (htc) - doesn't seems to work.[/color]
              >
              > Sounds like a Microsoft invention. I have never heard about it.
              > (checking: yes it is).
              > You should not expect anything but Microsoft's browser to support
              > their own inventions.
              >
              > /L
              > --
              > Lasse Reichstein Nielsen - lrn@hotpop.com
              > DHTML Death Colors:[/color]
              <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>[color=blue]
              > 'Faith without judgement merely degrades the spirit divine.'[/color]


              Comment

              • Lasse Reichstein Nielsen

                #8
                Re: Error in page

                "Mr. x" <a@b.com> writes:
                [color=blue]
                > Since I new on mozilla/netscape :
                > 1) about the javascript console - I didn't find where (netscape/mozilla) ?[/color]

                It is Tools > JavaScript Console in my Mozilla FIrebird 0.7.
                You can also enter "javascript :" in the address bar.
                [color=blue]
                > 3) Is there any way to figure out what browser is running, and do different
                > things for IE and for Mozilla/Netscape, so my page work on any browser ?[/color]

                Not with absolute accuracy. And don't think that doing different
                things for IE and Mozilla means that your page works in any
                browser. There are a lot of different browsers out there (e.g., I use
                Opera). The days where you could say "both browsers" and people would
                know what you meant, is over.

                In fact, it is pages that detect browsers by name and that therefore
                fails for unknown browsers (possibly because the author refuses access
                to unknown browsers - a deadly sin in web design), that has causes
                browser producers to add the ability to mimic a different browser. That
                is part of the reason why browser detection isn't possible.

                The recommended method for making pages work on most browsers, is:
                - Code the page to follow the official standards and recommendations .
                - Add special code only for the few browsers that you *know* doesn't
                support the standards. IE has a feature that makes adding IE-specific
                fixes easier: <!--[if IE]>conditional comments for IE<![end if]-->
                - When coding Javascript, make sure the page makes sense without it.
                Not everybody has Javascript available, or even enabled.
                - When coding Javascript, do object detection on the features you want
                to use. Don't use browser detection and attempt to infer the existence
                of other features from that.
                [color=blue]
                > 4) About htc - I use it for web-service generally (htc behaviour file for
                > web-services is a common file - services.htc) , and for some behaviour of
                > components (like common styles and events for the same behaviour
                > components).
                > Web-Service will work, even the server side is java-based, because it
                > doesn't metter what is on the server side - it is WDSL/SOAP
                > (I did some check on server side : Tomcat, and it works at the same
                > manner I do the checking for microsoft server),
                > so I think there must be a way to get web-service work in
                > netscape/mozilla.[/color]

                There is. But HTC is *Microsoft's* way of doing Web Services, and
                Mozilla uses another. Mozilla can access a Web Service directly using
                SOAP 1.0, without using an HTC file.

                You should not expect a Microsoft proprietary solution to be
                implemented in other browsers. Mozilla prefers to use only official
                standards.

                What I found was: <URL:http://200.210.8.13/~davilin/artigo_ingles.h tm>
                Mozilla SOAP API:
                <URL:http://www.oreillynet. com/pub/a/javascript/synd/2002/08/30/mozillasoapapi. html>

                (Apart from that, I don't know any more about web services than the average
                geek).
                /L
                --
                Lasse Reichstein Nielsen - lrn@hotpop.com
                DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
                'Faith without judgement merely degrades the spirit divine.'

                Comment

                • kaeli

                  #9
                  Re: Error in page

                  In article <3ccpbesp.fsf@h otpop.com>, lrn@hotpop.com enlightened us
                  with...[color=blue]
                  > "Mr. x" <a@b.com> writes:
                  >[color=green]
                  > > Since I new on mozilla/netscape :
                  > > 1) about the javascript console - I didn't find where (netscape/mozilla) ?[/color]
                  >
                  > It is Tools > JavaScript Console in my Mozilla FIrebird 0.7.
                  > You can also enter "javascript :" in the address bar.
                  >[/color]

                  Without the quotes.
                  Just in case you were typing the quotes and that's why it didn't come
                  up.
                  [color=blue]
                  >
                  > (Apart from that, I don't know any more about web services than the average
                  > geek).
                  > /L[/color]

                  Web services can be packaged nicely for any browser using .NET.
                  Don't ask me how, though - I know about it, I don't use it. .NET
                  requires IIS, which we don't have.

                  --
                  ~kaeli~
                  Support your local medical examiner: die strangely!



                  Comment

                  Working...