Basic question for a newbie JavaScript coder

Discussion in 'Javascript' started by Eli, Oct 22, 2004.

  1. Eli

    Eli Guest

    Hello Gurus,
    Started to write a basic script in JavaScript for the very first time.

    q1. Do you recommend a certain JavaScript language reference,
    preferably electronic version?

    q2. Do you recommend a freeware/shareware decent JavaScript editor
    that has the IntelliSense feature? IntelliSense used to help me heaps
    if Visual Studio in a past workplace.

    q3. I faced a bit of a surprise with the Window object. The
    window.print() function works fine but I did not find it in 2 book
    references I have. Is this a new feature you think? That's why I wrote
    "up-to-date" in q1 above.

    q4. Probably a stupid question: I remember that client side
    scripts/applets are not allowed to store data on the client's harddisk
    but to improve the performance of a web database under my development
    I'm again attracted to downloading a copy of the reference tables to
    the client's harddisk. The main point is obviously to reduce traffic
    on the customer's intranet and internet. Any suggestions?

    Heaps of thanks gurus.

    Eli
     
    Eli, Oct 22, 2004
    #1
    1. Advertisements

  2. Eli

    Jc Guest

    1.
    http://msdn.microsoft.com/library/en-us/script56/html/js56jsoriJScript.asp

    2. I just use TextPad myself.

    3. The window object is part of the web browser's Document Object Model
    (DOM) that is accessible through javascript. However, it has nothing to
    do with the actual language, which is why it wasn't mentioned. In
    addition to the previous link for the javascript reference, you'll want
    to use it in combination with the following link which documents the
    DOM (which you can access using javascript).
    http://msdn.microsoft.com/workshop/author/dhtml/reference/dhtml_reference_entry.asp

    4. Consider your client to be a "thin-client", if you're implementing
    it in javascript, you don't have the luxury of being able to cache
    things like a "thick-client" win32 application could. There are many
    things you can do to improve performance, but without being more
    familiar with your project I don't have anything specific to suggest.

    Note that I work exclusively with Internet Explorer 5 and higher, so
    the links I've posted are a bit biased as they document things that may
    not work in other browsers. Depending on your target audience's
    computers, you may want to find references that aren't IE specific.
     
    Jc, Oct 22, 2004
    #2
    1. Advertisements

  3. Eli

    Fred Oz Guest

    Or:

    http://www.mozilla.org/js/language/

    For other stuff, try:

    http://www.mozilla.org/docs/web-developer/#scripting

    which also has references for HTML, XML, CSS, etc.

    TextEdit is pretty handy shareware and good value at $US 30 for a
    single user licence (the demo never expires, it just bugs you to
    register after 30 days).
    Mozilla's DOM reference can be found at:

    http://www.mozilla.org/docs/web-developer/
     
    Fred Oz, Oct 22, 2004
    #3
  4. The only language reference that hasn't been mentioned so far is ECMA-262,
    the ECMAScript standard. Whilst it is the definitive reference for the
    language, it's not the easiest thing to read by any means. You can find a
    link to it in the online resources section of the FAQ
    (<URL:http://jibbering.com/faq/>).

    The references for DOM 1 and 2 can be found on the W3C web site
    It isn't really possible to provide IntelliSense for Javascript.
    Javascript is a loosely typed language, so a variable that at one point
    contained a string, could contain an object later. But more than that,
    there are few object members that you can guarantee will exist in all user
    agents; another difference with regard to strictly typed languages.
    No it's not new, but the window object is not part of the language. It's
    part of the "Level 0" Document Object Model - the de facto standard for
    basic scripting support in browsers.
    The only reasonably (but not totally) reliable client-side storage method
    is the cookie, which has very restrictive size limits.

    Mike
     
    Michael Winter, Oct 22, 2004
    #4

  5. If you have VS NET installed, give the file a .js extension, right clisk,
    and open in .NET.
    Gives you access to the Jscript, etc. online help and intellisense stuff
    in.NET.
     
    Howard Kaikow, Oct 22, 2004
    #5
  6. If you have .NET installed, see my other posting in his thread.
     
    Howard Kaikow, Oct 22, 2004
    #6
  7. I do. It doesn't change the fact that Javascript is not suitable for
    IntelliSense. That said, I suppose Microsoft assume information about
    their own browsers.

    Mike
     
    Michael Winter, Oct 22, 2004
    #7
  8. But IntelliSense for Windows IE (even Windows + Mac IE) is likely to be
    actively harmful in cross-browser scripting. And IntelliSense for
    ECMAScript (of which JScript is an implementation) is not that useful
    for exactly the reasons Mike outlined above. In a language with only one
    Object type, and where functions are of that type, how can a machine
    reading source code hop to distinguish between a function object that is
    a "class" constructor and a function object that is a "class" instance?
    Could it hope to recognise inheritance through the prototype alongside
    inheritance through augmentation (and multiple inheritance through the
    combination of both, or just the latter)?

    Richard.
     
    Richard Cornford, Oct 22, 2004
    #8
  9. Eli

    Eli Guest

    Thank you very much all for your contributions and the great discussion.
    I'll go after each sugestion.
    Kind regards,
    Eli
     
    Eli, Oct 24, 2004
    #9
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.