finding the error

Discussion in 'Javascript' started by WindAndWaves, Sep 27, 2004.

  1. WindAndWaves

    WindAndWaves Guest

    Hi Gurus

    First of all - I must tell you I am an absolute beginner.

    One of the problems I have with learning javascript is that I find it
    impossible to debug.

    I just use notepad to write the stuff and then when my IE gives me an error,
    the line (e.g. line 34) it mentions seems to be totally unrelated to the
    line which caused the error. My questions are twofold

    1. is that line in the IE error message of any help at all?

    2. does anyone has any recommendations for good javascript editors.

    TIA

    - Nicolaas
    WindAndWaves, Sep 27, 2004
    #1
    1. Advertising

  2. WindAndWaves

    Lee Guest

    WindAndWaves said:
    >
    >Hi Gurus
    >
    >First of all - I must tell you I am an absolute beginner.
    >
    >One of the problems I have with learning javascript is that I find it
    >impossible to debug.
    >
    >I just use notepad to write the stuff and then when my IE gives me an error,
    >the line (e.g. line 34) it mentions seems to be totally unrelated to the
    >line which caused the error. My questions are twofold
    >
    >1. is that line in the IE error message of any help at all?
    >
    >2. does anyone has any recommendations for good javascript editors.


    The editor you're using is fine.
    You need a better test environment than IE.
    Choose just about any other free browser.
    I recommend Firefox.
    Lee, Sep 27, 2004
    #2
    1. Advertising

  3. WindAndWaves

    Fred Oz Guest

    WindAndWaves wrote:

    > One of the problems I have with learning javascript is that I find it
    > impossible to debug.
    >
    > I just use notepad to write the stuff and then when my IE gives me an error,
    > the line (e.g. line 34) it mentions seems to be totally unrelated to the
    > line which caused the error. My questions are twofold


    IE - yech! Notepad - tragic.

    Try using a decent editor - EditPlus is pretty good, it's shareware and
    cheap (I'm presuming you don't have any other development environment).
    Others here likely can suggest other/better alternatives.

    http://www.editplus.com/ or tucows.

    > 1. is that line in the IE error message of any help at all?


    Yes, but if the script is in a HTML page, the line number refers to the
    start of the script the error is in, not the entire HTML file. Sometimes
    the actual error is the line above or maybe many lines above... Also,
    often just the first error is useful since subsequent errors may be
    caused by the first one (e.g. leaving off a quote mark...).

    > 2. does anyone has any recommendations for good javascript editors.
    >


    See above. More importantly, use another browser - Firefox has very
    good support, the javascript console will even attempt to highlight the
    erroneous line of code (usually pretty reliably too). But beware, it
    has a couple of bugs. But test in IE too, and as many other browsers as
    you dare.

    Fred.
    Fred Oz, Sep 27, 2004
    #3
  4. WindAndWaves

    WindAndWaves Guest

    "WindAndWaves" <> wrote in message
    news:boK5d.6976$...
    > Hi Gurus
    >
    > First of all - I must tell you I am an absolute beginner.
    >
    > One of the problems I have with learning javascript is that I find it
    > impossible to debug.
    >
    > I just use notepad to write the stuff and then when my IE gives me an

    error,
    > the line (e.g. line 34) it mentions seems to be totally unrelated to the
    > line which caused the error. My questions are twofold
    >
    > 1. is that line in the IE error message of any help at all?
    >
    > 2. does anyone has any recommendations for good javascript editors.
    >
    > TIA
    >
    > - Nicolaas
    >
    >


    Thanks both for your answer. I will download firefox.

    Do you know of any editors that will check your javascript syntax and will
    give you allow autocomplete and that sort of stuff (so I will learn the
    syntax faster)?
    WindAndWaves, Sep 27, 2004
    #4
  5. WindAndWaves wrote:

    > Do you know of any editors that will check your javascript syntax and will
    > give you allow autocomplete and that sort of stuff (so I will learn the
    > syntax faster)?


    IIRC Macromedia Dreamweaver (for Windows) provides an autocomplete feature.
    However, you should keep away from code generated by Dreamweaver (snippets
    and widgets).

    On GNU/Linux you should try Quanta Plus (requires KDE).

    However, on both OSes I prefer PHPeclipse for the Java-based eclipse IDE
    platform (but then I don't consider myself a beginner anymore.)

    But keep in mind that most of client-side J(ava)Scripting is UA dependent
    DOM scripting. Even more, whether a language feature is available or not
    depends on the UA and its script engine. It is likely that no editor
    provides sufficient built-in information about the available and
    unavailable features. Only study (of the specs, this group etc.) really
    helps.


    PointedEars
    Thomas 'PointedEars' Lahn, Oct 11, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Preben Holm
    Replies:
    2
    Views:
    560
    Preben Holm
    Apr 28, 2005
  2. Sanju
    Replies:
    1
    Views:
    362
    Kevin Spencer
    Jul 30, 2003
  3. Adam Teasdale Hartshorne

    Help Finding Error In std::find code

    Adam Teasdale Hartshorne, Aug 14, 2005, in forum: C++
    Replies:
    1
    Views:
    317
    Dave Townsend
    Aug 14, 2005
  4. andrew browning
    Replies:
    2
    Views:
    380
    andrew browning
    May 14, 2006
  5. Sanny

    Finding Error in Applet.

    Sanny, Jan 13, 2008, in forum: Java
    Replies:
    23
    Views:
    684
Loading...

Share This Page