JavaScript

From MozillaZine Knowledge Base
Revision as of 15:29, 1 August 2006 by Alice Wyman (talk | contribs) (→‎Enabling JavaScript: removed "Note:" from in front of the last paragraph.)
Jump to navigationJump to search

JavaScript is a programming language supported by many browsers which allows webpage authors to have greater control over the user’s browsing experience. JavaScript is often used to create fly-out menus, invoke pop-up windows, validate form data and so on. Please note that JavaScript is not Java!

Any errors that may occur when the browser tries to run JavaScript will appear in the JavaScript Console.

Enabling JavaScript

Many web pages require JavaScript to work properly. To make sure that JavaScript is enabled in Firefox or Mozilla Suite, check these settings:

  • Firefox: "Tools -> Options -> Content (Web Features in Firefox 1.0.x) -> Enable JavaScript".
  • Mozilla Suite: "Edit -> Preferences -> Advanced -> Scripts & Plug-ins -> Enable JavaScript for -> Navigator" (JavaScript is disabled by default for the "Mail & Newsgroups" component , for security reasons.)

If JavaScript is enabled in Firefox or Mozilla Suite but isn't working, make sure that it isn't being blocked by an extension like NoScript. Firewall programs or other security software can also include options that block JavaScript, such as the "Mobile Code Control" settings in ZoneAlarm Pro [1])

Advanced JavaScript settings

These advanced settings are accessible when you enable JavaScript (see above) and, in Firefox, when you press the "Advanced" button. You can allow scripts on web pages to take certain actions by checking the appropriate boxes, or you can prevent the actions by unchecking these settings:

Move or resize existing windows: Allows scripts to change the size or position of the existing window.

Raise or lower windows: Allows scripts to place windows underneath or on top of other windows.

Disable or replace context menus: Allows scripts to disable or change context (right-click) menus.

Hide the status bar: Allows scripts to hide the status bar, as in popup windows.

Change status bar text: Allows scripts to replace the status bar web address (URL) with scrolling text.

Change images: Allows scripts to change or animate images, as in image rollovers. Warning: Unchecking "Change images" can prevent some images from loading, make some webpage menus harder to navigate and disable features such as zooming in and out of maps [2]. (This option has been removed from the Advanced JavaScript Settings window in Firefox 1.5. If necessary, use about:config to reset the related dom.disable_image_src_set preference to the default "false" value.)

See also

External Links