Info - Javascript FAQ

Section 1: General JavaScript Info
  1. What is JavaScript?
  2. What is the goal of the JavaScript Newsgroup?
  3. Aren't JavaScript and Java the same thing?
  4. What browsers support JavaScript, and where can I find documentation?
  5. What are the compatibility issues for the Netscape Developer?
  6. Where is the current bug list for JavaScript?
  7. How do I report a bug?
  8. What differences exist between JavaScript versions?
  9. What is the difference between Client-Side and Server-Side JavaScript?

1.1: What is JavaScript? 1.2: What is the goal of the JavaScript Newsgroup? 1.3: Aren't JavaScript and Java the same thing? 1.4: What browsers support JavaScript, and where can I find documentation? 1.5: What are the compatibility issues for the Netscape Developer? 1.6: Where is the current bug list for JavaScript? 1.7: How do I report a bug? 1.8: What differences exist between JavaScript versions? 1.9: What is the difference between Client-Side and Server-Side JavaScript? Back to the Question Summary, or to the top.


Section 2: JavaScript Programming Basics
  1. How can I use JavaScript to detect the browser type & version?
  2. Is JavaScript's math inaccurate (0.119 * 100 = 11.899999)?
  3. How do I do image "rollovers" (change the image when the mouse is over it)?
  4. How do I use the different substring functions to extract part of a string?
  5. How do I round numbers off to a certain number of decimal places?
  6. Why do I have trouble with JavaScript within tables?
  7. Where can I get information on Cookies?
  8. Why do I sometimes see a URL beginning with wysiwyg?
  9. Problems caching .js source files?
  10. Can I detect the back button?
  11. What's the difference between Grey and Gray?
  12. Why doesn't document.lastModified work when I put my files on a web server?
  13. Why do I have trouble adding values in forms?

2.1: How can I use JavaScript to detect the browser type & version? 2.2: Is JavaScript's math inaccurate (0.119 * 100 = 11.899999)? 2.3: How do I do image "rollovers" (change the image when the mouse is over it)? 2.4: How do I use the different substring functions to extract part of a string? 2.5: How do I round numbers off to a certain number of decimal places? 2.6: Why do I have trouble with JavaScript within tables? 2.7: Where can I get information on Cookies? 2.8: Why do I sometimes see a URL beginning with wysiwyg? 2.9: Problems caching .js source files? 2.10: Can I detect the back button? 2.11: What's the difference between Grey and Gray? 2.12: Why doesn't document.lastModified work when I put my files on a web server? 2.13: Why do I have trouble adding values to forms? Back to the Question Summary, or to the top.


Section 3: Syntax
  1. Why do the <script> container tags need to be enclosed inside comments?
  2. Is the LANGUAGE='JavaScript' attribute required?
  3. Where can <SCRIPT> container tags be placed within an HTML document?
  4. Are semicolons(;)required at the end of all JavaScript statements?
  5. How can I use quotation marks within a JavaScript statement?
  6. What "scope" does a newly created variable have?
  7. What does var do?
  8. Is there any way to control the way a page prints using JavaScripts, can page breaks be forced, etc.?

3.1: Why do the <script> container tags need to be enclosed inside comments? 3.2: Is the LANGUAGE='JavaScript' attribute required? 3.3: Where can <SCRIPT> container tags be placed within an HTML document? 3.4: Are semicolons(;)required at the end of all JavaScript statements? 3.5: How can I use quotation marks within a JavaScript statement? 3.6: What "scope" does a newly created variable have? 3.7: What does var do? 3.8: Is there any way to control the way a page prints using JavaScripts, can page breaks be forced, etc.? Back to the Question Summary, or to the top.


Section 4: Frames & Windows
  1. Why does document.write() open a new window instead of writing to the current one?
  2. How can I load a frame without additional files?
  3. How do I reference functions in a different frame?
  4. How do I change two frames simultaneously with one click?
  5. How can code in one frame determine if code in the other frames in my frameset have finished loading?
  6. Why does my call to window.open() not display the window type and size I specify?
  7. How can I create a modal window (one that can't be minimized) using JavaScript?
  8. Can I write JavaScript that will execute when the user closes a window?
  9. How can I control the placement of a new window using window.open()?
  10. How can I close a window without causing a confirm prompt to appear?
  11. I have a pop-up window for a menu. How can my selections from this menu open documents in a full size window?
  12. Can I reuse the same pop-up window on different pages?

4.1: Why does document.write() open a new window instead of writing to the current one? 4.2: How can I load a frame without additional files? 4.3: How do I reference functions in a different frame? 4.4: How do I change two frames simultaneously with one click? 4.5: How can code in one frame determine if code in the other frames in my frameset have finished loading? 4.6: Why does my call to window.open() not display the window type and size I specify? 4.7: How can I create a modal window (one that can't be minimized) using JavaScript? 4.8: Can I write JavaScript that will execute when the user closes a window? 4.9: How can I control the placement of a new window using window.open()? 4.10: How can I close a window without causing a confirm prompt to appear? 4.11 I have a pop-up window for a menu. How can my selections from this menu open documents in a full size window? 4.12 Can I reuse the same pop-up window on different pages? Back to the Question Summary, or to the top.


Section 5: Forms
  1. How can I use a select box as a navigation menu?
  2. How can I use an image for a submit button?
  3. How can I pass data between forms on different pages using JavaScript?
  4. Why doesn't document.formName.selectObject.value reflect the value of the selected item in the list?
  5. How do I get the value of the currently selected radio button in a radio group or group of checkboxes?
  6. How do I get a form to submit with the Enter key?
  7. How can I disable a text input field?

5.1: How can I use a select box as a navigation menu? 5.2: How can I use an image for a submit button? 5.3: How can I pass data between forms on different pages using JavaScript? 5.4: Why doesn't document.formName.selectObject.value reflect the value of the selected item in the list? 5.5: How do I get the value of the currently selected radio button in a radio group or group of checkboxes? 5.6: How do I get a form to submit with the Enter key?

5.7: How can I disable a text input field?

Use the onfocus handler to call the blur() function:

<INPUT TYPE="text" NAME="aTextField" ONFOCUS="this.blur()">

If you want to disable/enable dynamically use function skip (e)

{ this.blur(); }
  <A HREF="javascript:document.formName.aTextField.onfocus = skip; void
0">disable text field</A>
  <A HREF="javascript:document.formName.aTextField.onfocus = null; void
0">enable text field</A> 

Back to the Question Summary, or to the top.


Section 6: JavaScript Security
  1. What is a signed script?
  2. Access disallowed from scripts at one.ingenia.com to documents at two.ingenia.com?
  3. Why aren't I able to read the URL history using the history object?

6.1: What is a signed script? 6.2: Access disallowed from scripts at one.ingenia.com to documents at two.ingenia.com? 6.3: Why aren't I able to read the URL history using the history object? Back to the Question Summary, or to the top.


Section 7: LiveConnect Techniques
  1. How can I change the user's preferences using JavaScript?
  2. How can I make Socket calls in JS?
  3. Can I use JavaScript to read the source of an HTML page?

7.1: How can I change the user's preferences using JavaScript? 7.2: How can I make Socket calls in JS? 7.3: Can I use JavaScript to read the source of an HTML page?