comp.lang.javascript FAQ - META - 8.1 - 2005-11-05
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

comp.lang.javascript FAQ - META - 8.1 - 2005-11-05

From: FAQ Poster <Jim@jibbering.com>
Date: Wed Nov 30 2005 - 13:00:05 CET

comp.lang.javascript FAQ - META - 8.1 - 2005-11-05

 1 meta-FAQ meta-questions
 2 comp.lang.javascript tips
  2.1 Which newsgroup deals with javascript?
  2.2 What questions are off-topic for clj?
  2.3 What do I have to do before posting to clj?
  2.4 Why was my post not answered?
  2.5 How do I direct someone to this FAQ?
  2.6 What is ECMAScript?
  2.7 What is JScript?
  2.8 What are object models?
  2.9 What is the document object model?
  2.10 Internationalisation in javascript.
  2.11 I have a question that is not answered in here or
    in any of the resources mentioned here but I'm sure it has been
    answered in clj. Where are the clj archives located?
  2.12 What does the future hold for ECMAScript?
 3 javascript resources
  3.1 What books cover javascript?
  3.2 What online resources are available?
 4 Quick Answers
  4.1 How do I protect my javascript code?
  4.2 How can I disable the back button in a web browser?
  4.3 How can I access the client-side filesystem?
  4.4 How can I see in javascript if a web browser accepts cookies?
  4.5 How can I protect a webpage in javascript?
  4.6 How do I convert a Number into a String with exactly 2 decimal places?
  4.7 Why does 5 * 1.015 != 5.075 or 0.06+0.01 != 0.07?
  4.8 How do I communicate between frames in a web browser?
  4.9 How do I find the size of a browser window?
  4.10 How do I check to see if a childwindow is open, before opening another?
  4.11 Why does framename.print() not print the correct frame in IE?
  4.12 Why does parseInt('09') give an error?
  4.13 How do I get the value of a form control?
  4.14 How do I close a window and why does it not work on the first one?
  4.15 How do I modify the current page in a browser?
  4.16 How do I trim whitespace - LTRIM/RTRIM/TRIM?
  4.17 How do I force a reload from the server/prevent caching?
  4.18 How do I get a perl/asp/php variable into client-side js?
  4.19 Why do I get permission denied when accessing a frame/window?
  4.20 How do I make a 10 second delay?
  4.21 Why does 1+1 equal 11? or How do I convert a string to a number?
  4.22 How do I generate a random integer in [1..N]?
  4.23 How do I change print settings with window.print()?
  4.24 I have <a href="javascript:somefunction()"> what ... ?
  4.25 My element is named myselect[] , how do I access it?
  4.26 How do I detect Opera/Netscape/IE?
  4.27 How do I disable the right mouse button?
  4.28 How do I change the confirm box to say yes/no or default to cancel?
  4.29 How do I log-out a user when they leave my site?
  4.30 How do I format Last Modified date with javascript
  4.31 Why are my Rollovers so slow?
  4.32 How do I change the text in the url/location bar?
  4.33 How do I prompt a "Save As" dialog for an accepted mime type?
  4.34 How do I run a server side script?
  4.35 I have window.status="Moomin"; why doesn't the statusbar change?
  4.36 How do I modify the current browser window?
  4.37 How do I POST a form to a new window?
  4.38 How do I download a page to a variable?
  4.39 How do I access a property of an object using a string?
  4.40 When should I use eval?
  4.41 Why doesn't the global variable "divId" always refer to the element with id="divId"?
  4.42 How do I open a new window with javascript?
  4.43 How do I get my browser to report javascript errors?
 5 Comments and Suggestions
  5.1 Why do some posts have <FAQENTRY> in them ?
  5.2 How do I make a suggestion?

 1 meta-FAQ meta-questions

      You are reading the _comp.lang.javascript_ meta-FAQ,
      version 8.1. It is available on the web at
      <URL: http://www.jibbering.com/faq/ > in HTML form.
   
      This is the official _comp.lang.javascript_ (clj) FAQ.
      Or, more accurately, the meta-FAQ. It mainly provides URLs to
      further information about javascript, and some hints and tips to
      make your stay in comp.lang.javascript more enjoyable.
   
     This document was created for three reasons: to help reduce the
     high levels of noise on clj, to provide a resource for people
     new to javascript, and to point to locations that contain
     valuable javascript resources.
   
      The FAQ will currently be posted in two parts, one part (the
      Quick Answers) on Mondays and Fridays, with the remainder posted
      on wednesdays.
   
      To cope with a desire for additional explanation and detail
      relating to some aspects of the FAQ, an additional resource
      is available at:-

      <URL: http://www.jibbering.com/faq/faq_notes/faq_notes.html >

      It has been provided separately to avoid increasing the size of
      the FAQ to a point where it would be unreasonable to post it to
      the group.
   

 2 comp.lang.javascript tips
  2.1 Which newsgroup deals with javascript?

      comp.lang.javascript is the official Usenet newsgroup dealing
      with javascript. There are other newsgroups but many of them are
      not carried by most news feeds. clj is an unmoderated newsgroup.
     

  2.2 What questions are off-topic for clj?

      clj deals with ECMAScript languages, so any questions about
      JavaScript or JScript are welcome. However, the majority of
      questions sent to this group relates to javascript in a web
      browser. If you are experiencing issues with a particular
      browser, or the host is not a browser at all, please make
      this information clear.
     
      Javascript and Java are two completely different languages.
      Java questions should be asked in one of the comp.lang.java.*
      newsgroups; they are not appropriate for clj (as Java and
      javascript are distinct programming languages with only
      superficial similarities due to sharing a C-like syntax and
      some of the characters in their names).
     
      Questions dealing with other scripting languages, such as
      VBScript, PerlScript or CGI scripting are also off-topic,
      as are HTML-only or CSS-only questions.
     
      Questions that are specific to Microsoft's JScript may also
      be appropriately asked at:
      news:microsoft.public.scripting.jscript
      The comp.lang.javasciript newsgroup charter is included in
      <URL: http://www.jibbering.com/faq/faq_notes/cljs_charter.html >

  2.3 What do I have to do before posting to clj?

      Before posting to clj, you should thoroughly read this document.
      You should also check the resources mentioned in section 3 and
      the Quick Answers in section 4. Read FYI28/RFC1855
      <URL: http://www.ietf.org/rfc/rfc1855.txt >,on Usenet and
      <URL: http://www.jibbering.com/faq/faq_notes/clj_posts.html >.
      Also you should read all appropriate posts to the clj newsgroup
      for several days. Most questions come up at least once every
      other day and people can get annoyed of answering them
      repeatedly.
     
      Please state your question as clearly and concisely as possible,
      as this will make it far easier for the other readers of the
      group to understand your problems and suggest possible solutions.
      Use the Subject: of your post to indicate the type of problem
      you have, but include the question in the body as well. 'Help!'
      or 'I hate Netscape!' are not nearly as useful to contributors
      who do not read every post as 'parseInt("09")!=9'.
     
      Has the same question already been posted that day? - if it has
      wait to see if the answers to that solve your problem.
     
      Include the script you have been working on (or URL) - indicate
      the problem spots and/or previous attempts. Try to limit the
      length of your post by removing extraneous page elements, but
      avoid removing script unless you are sure it is not an issue. If
      the script is long though, please do not post the full script
      and just provide a link. As a guide more than 500 lines for a
      post is not normally a good idea in any circumstances. A
      mention of which platforms and browsers are used or are giving
      problems is also necessary.
     
      Post in plain-text only. Do not post using HTML. If you have to
      include your script, paste it in to your post in plain-text. Do
      not uuencode it or attach it using MIME. There is good reason for
      this request: many newsreaders do not read HTML or MIME, and this
      limits the number of people who could help you. Test posts belong
      in test newsgroups (they have "test" in their names).
     
      When replying to a message on the group quote the minimum of the
      preceding messages post that is sufficient to provide context for
      the reply but trim the remainder, and add your comments below the
      pertinent section of quoted material, as per FYI28/RFC1855 (never
      top post).
     
      If posting through groups.google.com don't use the "Reply" link
      at the bottom of the article, instead use "Show Options" at the
      top of the article and than click the "Reply" option exposed
      there. This automatically includes the quote of the preceding
      message to be edited down as described above.
    
      Don't ask, or at least expect, to be emailed individually. Some
      individuals run scams for the purpose of collecting active email
      addresses and many won't risk being victimized. If you have
      circumstances that won't allow you to read clj for the
      follow-up, explain what they are and ask to be CC'ed a copy. You
      also might try <URL: http://groups.google.com/ > to read replies.
     
      Don't expect to be able to e-mail contributors to the group
      privately. E-mail addresses are often obscured, fictional or
      unmonitored span sinks (this is an increasingly normal (and
      even unofficially recommended) practice as open e-mail
      addresses in news articles will be both the target of spam
      and used as fake sender's addresses in spam to third parties).
     
      Don't take flames too seriously, and don't start a thread
      complaining about rude or flippant responses. There is already
      enough noise in clj. Keep a sense of humour while posting and
      reading and everything will be a lot more enjoyable.
     
      Remember that it is _not_ the _job_ of posters
      here to help you. The majority of regular posters here do so
      _voluntarily_ in their free time. They have good days
      and bad days just like everyone else.
     
      clj is a technical group: the posting of job adverts and
      commercial adverts are not welcome. Job postings should go to
      an appropriate regional jobs group. Announcements of products
      of particular relevance to javascript are welcome, but not
      more often than once per major release, and then post a short
      link to the product's webpage.
     

  2.4 Why was my post not answered?

      This could be for several reasons:
      

         It was a variation of a frequently asked question and was
         therefore ignored by everyone
       
         No one knows the answer
       
         The person with the answer has not seen the post
       
         It might not be possible to do what you want to do but
         perhaps readers of clj are reluctant to answer your post
         in the negative when they are not convinced that it
         cannot be done.
       
         The question was not asked clearly enough, or included enough
         information to be answered.
       
        The questioner did not realise the need to read the group, for
        a few days, to see the answers posted there
       

      If it is not one of these, then after a few days consider
      reposting after checking <URL: http://groups.google.com/ > for
      replies. Make sure the post is phrased well, and everything
      needed to answer is correct, and the subject is appropriate.
    

  2.5 How do I direct someone to this FAQ?

      This document is posted to clj very frequently. There should be
      no reason to direct someone to it. However, if someone asks a
      question answered in this FAQ or in one of the resources listed
      herein, please let them know their question is answered in the
      FAQ and that the FAQ can be found at
      <URL: http://www.jibbering.com/faq/ >

  2.6 What is ECMAScript?
<URL: http://www.ecma-international.org/publications/standards/Ecma-262.htm >
      ECMAScript is the international standard for javascript. JScript
      3.0 and JavaScript 1.2 (available with version 4. browsers) are
      more or less ECMAScript compliant. In addition ECMA 327 defines
      the Compact Profile of ECMAScript by describing the features from
      ECMA 262 that may be omitted in some resource-constrained
      environments. Note that ECMAScript did not attempt to standardize
      the document object model.
     
      The current edition is ECMA-262, 3rd Edition. There is some suppor
      for this edition in JScript 5.0 and JavaScript 1.3. JScript 5.5
      and JavaScript 1.5, in Netscape 6.1 and later, are compliant
      (JavaScript 1.5 in Netscape 6 missed some methods).
     

  2.7 What is JScript?

      JScript is Microsoft's implementation of ECMAScript.
     

  2.8 What are object models?
    
      Object models (OMs) are not part of the javascript language: they
      are provided by the host to allow javascript (or other scripting
      language) to communicate with the host. An object model may allow
      javascript to access a file system, or control a nuclear power
      station. The most commonly used object models via javascript are
      provided by Active Server Pages, Server Side JavaScript, and the
      Windows Script Host. The most common of all of course is the
      Document Object Model (DOM) provided by web browsers. Other
      document types such as SVG also define scriptable DOMs, mostly as
      extensions of the W3C Core DOM specification designed for use
      with XML documnets.
     

  2.9 What is the document object model?

      This is the collection of objects provided by each browser.
      Basically, any object in the window hierarchy is part of the
      DOM. This means that document.writeln(), for example, is not a
      javascript method but is, in fact, a method provided by the DOM.
      The DOM has been standardised by the World Wide Web Consortium
      (W3C); however, like
      all W3C standards, browser support is not yet complete. Most
      cross-browser coding problems come from slightly different
      implementations of the DOM in the differentbrowsers.
      W3 DOM FAQ <URL: http://www.w3.org/DOM/faq.html >
      The W3C has worked on three versions of the DOM to date. The
      third version has not yet achieved the status of a
      recommendation <URL: http://www.w3.org/DOM/ >.
    

  2.10 Internationalisation in javascript.

      There are but a few Internationalisation features in JavaScript.
      The various toString() methods are all implementation dependent,
      but tend to use either UK or US settings. ECMAScript Ed. 3 has
      introduced some capabilities, including the toLocaleString()
      method which should create a string based on the host's locale.
      Much more support is expected in future versions of JavaScript.
     

  2.11 I have a question that is not answered in here or
    in any of the resources mentioned here but I'm sure it has been
    answered in clj. Where are the clj archives located?
<URL: http://groups.google.com/ > Maintain an archive of
      comp.lang.javascript going back to 1996 and provide diverse
      archive searching facilities.
     

  2.12 What does the future hold for ECMAScript?

      The ECMAScript Technical Committee is now working on the fourth
      edition, the first implementation of which is JScript.NET. It
      includes a compiler, allowing you to create standalone JScript
      executables.
     
      The fourth edition of ECMAScript will provide new features like
      typed variables, and classes. More information can be found at:
      <URL: http://www.mozilla.org/js/language/es4/index.html >,
      <URL: http://msdn.microsoft.com/voices/scripting07142000.asp >
      or from news:microsoft.public.dotnet.languages.jscript

 3 javascript resources
  3.1 What books cover javascript?

      The only book currently endorsed by c.l.j. regulars is:
      JavaScript: The Definitive Guide, 4th Edition By David Flanagan
      ISBN:0-596-00048-0 (Also by David Flanagan: JavaScript Pocket
      Reference, 2nd Edition. ISBN 0-596-00411-7 for language and API
      reference alone).
      
   <URL: http://www.oreilly.com/catalog/jscript4/ >

  3.2 What online resources are available?

       Javascript FAQ site, please check first:-
      
   <URL: http://javascript.faqts.com/ >

       Mozilla JavaScript 1.5 reference:-
       
   <URL: http://developer.mozilla.org/en/docs/JavaScript >

       Index of Netscape 4 JavaScript docs online (These documents
       are no longer available form Netscape but are still
       reproduced by Sun Microsystems, Inc.):-
       
   <URL: http://docs.sun.com/source/816-6408-10/ >

       Index of Archived Netscape 4 JavaScript docs online and for
       download:-
       
   <URL: http://devedge-temp.mozilla.org/library/manuals/2000/javascript/1.3/reference/ >

       Online Gecko DOM Reference:-
       
   <URL: http://www.mozilla.org/docs/dom/domref >

       Download:-
       
   <URL: http://www.mozilla.org/docs/dom/domref.zip >

       Microsoft (D)HTML reference:-
       
   <URL: http://msdn.microsoft.com/workshop/author/dhtml/reference/dhtml_reference_entry.asp >

       JScript reference and main Microsoft script site:-
       
   <URL: http://msdn.microsoft.com/library/en-us/script56/html/js56jsoriJScript.asp >
   <URL: http://msdn.microsoft.com/scripting/ >

       Opera Documentation:-
       
   <URL: http://www.opera.com/docs/specs/#ecmascript >
   <URL: http://www.opera.com/docs/specs/js/ >

       ICab's Inscript documentation:-
       
   <URL: http://www.muchsoft.com/inscript/ >

       Archived documentation for MSIE 3.x:-
       
   <URL: http://members.tripod.com/~housten/download/ >

       The official ECMAScript specification:-
       
   <URL: http://www.ecma-international.org/publications/standards/Ecma-262.htm >

       Other versions of the ECMAScript specification:-
       
   <URL: http://www.mozilla.org/js/language/ >

       DOM level 1 ECMA script binding:-
       
   <URL: http://www.w3.org/TR/REC-DOM-Level-1/ecma-script-language-binding.html >

       DOM HTML level 2 ECMA script binding:-
       
   <URL: http://www.w3.org/TR/DOM-Level-2-HTML/ecma-script-binding.html >

       FESI - a free implementation of ECMAScript in Java:-
       
   <URL: http://www.lugrin.ch/fesi/index.html >

       Frequently asked questions about source code obfuscation:-
       
   <URL: http://jibbering.com/faq/obfuscate.html >

       Sites discussing Active Server Pages:-
       
   <URL: http://www.15seconds.com/ >
   <URL: http://www.4guysfromrolla.com/ >
   <URL: http://www.aspfaq.com/ >

       DHTML source code and tutorials:-
      
   <URL: http://www.w3schools.com/ >

       Sites focused on using Scripting to automate Windows:-
       
   <URL: http://www.windows-script.com/ >
   <URL: http://cwashington.netreach.net/ >

       Microsoft's Windows Scripting Host Newsgroup:-
       
   <URL: http://groups.google.com/group/microsoft.public.scripting.wsh >

       Manipulating times, dates and the lastModified date and time in
       javascript:-
       
   <URL: http://www.merlyn.demon.co.uk/js-dates.htm >

       Venkman - Mozilla Visual JS debugger:-
       
   <URL: http://www.mozilla.org/projects/venkman/ >

       Whitebeam Apache Module - Server Side Javascript in Apache;-
       
   <URL: http://www.whitebeam.org/ >

       Digital Mars DMD Script, console and MS Active Script
       implementation of ECMAScript, claimed to be faster than other
       implementations:-
       
   <URL: http://www.digitalmars.com/dscript/ >

 4 Quick Answers

   see <URL: http://jibbering.com/faq/#FAQ4 >
    Or Mondays FAQ posting.

 5 Comments and Suggestions
  5.1 Why do some posts have <FAQENTRY> in them ?

      If a poster feels that the question they are answering should be
      covered in the FAQ, placing <FAQENTRY> in your post lets the FAQ
      robot collect the messages for easy review and inclusion.
    
      The <FAQENTRY> should not be used in posts except in
      conjunction with a suggestion/proposal for the FAQ. It should
      also not be literally quoted in replies, instead it should be
      partly obscured as, e.g. <FAQ**TRY> or similar.
    

  5.2 How do I make a suggestion?

      To Make a suggestion to the FAQ, use either the FAQENTRY method
      above, or email Richard Cornford (Richard@litotes.demon.co.uk),
      current FAQ editor) or Jim Ley (jim@jibbering.com). All
      comments, suggestions, and especially corrections are welcome.
    
Received on Sat Dec 3 04:33:20 2005