Controlling JavaScript

 < Day Day Up > 

Is JavaScript bad or good? And what's the difference between Java and JavaScript?

Java is a programming language that is platform independent and usually interpreted. It is primarily used to build HTML pages, allowing the developer to create platform-independent pages. Java programs are often called applets. To run Java applets, Java must be installed.

JavaScript is a scripting language that is also primarily used to build HTML pages. It is used to make the pages more dynamic, or interactive. Despite the similar names, JavaScript is separate from Java and does not require Java to be run.

So, are they the same or not? The true answer is a vague yes and no. Yes, they have the same basic concepts, but no they are separate entities. One can exist without the other.

In Firefox you can control whether to allow Java and whether to allow JavaScript. Either can be allowed or disallowed. The Java option does not have any options other than to enable or disable Java. Both Java and JavaScript can create a security risk (although it may be slight) if enabled.

JavaScript in Firefox does have options, as shown in Figure 5.7. These options ensure that JavaScript does not do anything that is not acceptable to you.

Figure 5.7. With JavaScript, you can set options to control how much freedom you will allow it to have.


These options include

  • Move or Resize Existing Windows Allowed by default, JavaScript will be able to move and resize screens it is using.

  • Raise or Lower Windows This refers to giving a window JavaScript focus, making it the topmost, current window. I find this behavior most annoying because I don't like software controlling what I am doing and when I do it. When I need the window, I have a mouse, and I know how to use it.

  • Disable or Replace Context Menus Context menus are displayed when you right-click an object or content. This is a useful feature. Context menus are unobtrusive and provide a great shortcut to the main menu. (That's why they are often called shortcut menus.)

  • Hide the Status Bar The Firefox status bar is normally at the bottom of the screen. It is used to display information about the current page, such as the destination of hyperlinks. This permission is not set by default.

  • Change Status Bar Text Generally, Firefox manages what is displayed in the status bar. However, JavaScript can change that display if you allow it. Sometimes this feature is used to trick a user into believing that a hyperlink points to a location other than what it really points to. This permission is not set by default.

     < Day Day Up > 


    Firefox and Thunderbird. Beyond Browsing and Email
    Firefox and Thunderbird Garage
    ISBN: 0131870041
    EAN: 2147483647
    Year: 2003
    Pages: 245

    Similar book on Amazon

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net