free javascript



javascript

javascript

"Js" redirects here. For other uses, see JS.
JavaScript
Paradigm: multi-paradigm
Appeared in: 1995
Designed by: Brendan Eich
Developer: Netscape Communications Corporation, Mozilla Foundation
Typing discipline: duck typing
Major implementations: SpiderMonkey, Rhino, KJS, JavaScriptCore
Dialects: JScript
Influenced by: Self, Perl
JavaScript
File extension: .js
MIME type: application/javascript[1]

JavaScript is the name of Netscape Communications Corporation's and now the Mozilla Foundation's implementation of the ECMAScript standard, a scripting language based on the concept of prototype-based programming. The language is best known for its use in websites (as client-side JavaScript), but is also used to enable scripting access to objects embedded in other applications.

Despite the name, JavaScript is only distantly related to the Java programming language, the main similarity being their common debt to the C syntax. Semantically, JavaScript syntax has far more in common with the Self programming language.

JavaScript is a registered trademark of Sun Microsystems, Inc. It was used under license for technology invented and implemented by Netscape Communications and current entities such as the Mozilla Foundation.[2]

Contents

  • 1 History
  • 2 Usage
  • 3 Debugging
  • 4 Security
  • 5 Related languages
  • 6 References
  • 7 See also
  • 8 External links

History

JavaScript was originally developed by Brendan Eich of Netscape under the name Mocha, later LiveScript, and finally renamed to JavaScript. The change of name from LiveScript to JavaScript roughly coincided with Netscape adding support for Java technology in its Netscape Navigator web browser. JavaScript was first introduced and deployed in the Netscape browser version 2.0B3 in December of 1995. When web developers talk about using JavaScript in Internet Explorer, they are actually using JScript. The choice of name proved to be a source of much confusion.

As of 2006, the latest version of the language is JavaScript 1.7. The previous version 1.6 corresponded to ECMA-262 Edition 3 like JavaScript 1.5, except for Array extras, and Array and String generics. ECMAScript, in simple terms, is a standardized version of JavaScript. The ECMA-357 standard specifies E4X, a language extension dealing with XML.

Usage

Some JavaScript source-code, as seen within the text editor SciTE.

JavaScript is a prototype-based scripting language with a syntax loosely based on C. Like C, the language has no input or output constructs of its own. Where C relies on standard I/O libraries, a JavaScript engine relies on a host environment into which it is embedded. There are many such host environment applications, of which web technologies are the best-known examples. These are examined first.

One major use of web-based JavaScript is to write functions that are embedded in or included from HTML pages and interact with the Document Object Model (DOM) of the page to perform tasks not possible in HTML alone. Some common examples of this usage follow.

  • Opening or popping up a new window with programmatic control over the size, position and 'look' of the new window (i.e. whether or not the menus, toolbars etc are visible).
  • validation of web form input values to make sure that they will be accepted before they are submitted to the server.
  • Changing images as the mouse cursor moves over them: This effect is often used to draw the user's attention to important links displayed as graphical elements.

The DOM interfaces in various browsers differ and don't always match the W3C DOM standards. Rather than write different variants of a JavaScript function for each of the many browsers in common use today, it is usually possible, by carefully following the W3C DOM Level 1 or 2 standards, to provide the required functionality in a standards-compliant way that most browsers will execute correctly. Care must always be taken to ensure that the web page degrades gracefully and so is still usable by any user who:

  • has JavaScript execution disabled - for example as a security precaution
  • has a browser that does not understand the JavaScript - for example on a PDA or mobile phone
  • is visually or otherwise disabled and may be using an unusual browser, a speech browser or may have selected extreme text magnification. For more information on this, see the Web Accessibility Initiative

Other examples of JavaScript interacting with a web page's DOM have been called DHTML and SPA.

A different example of the use of JavaScript in web pages is to make calls to web and web-service servers after the page has loaded, depending upon user actions. These calls can obtain new information, which further JavaScript can merge with the existing page's DOM so that it is displayed. This is the basis of Ajax programming. PnP JavaScript design pattern was adopted gradually after commonly use of Ajax to reduce JavaScript maintenance cost.

Outside of the Web, JavaScript interpreters are embedded in a number of tools. Adobe Acrobat and Adobe Reader support JavaScript in PDF files. The Mozilla platform, which underlies several common web browsers, uses JavaScript to implement the user interface and transaction logic of its various products. JavaScript interpreters are also embedded in proprietary applications that lack scriptable interfaces. Dashboard Widgets in Apple's Mac OS X v10.4 are implemented using JavaScript. Microsoft's Active Scripting technology supports JavaScript-compatible JScript as an operating system scripting language. JScript .NET is a CLI-compliant language that is similar to JScript, but has further object oriented programming features. Tools in the Adobe Creative Suite, including Photoshop, allow scripting through JavaScript.

The Java programming language, in version SE 6 (JDK 1.6), introduced the javax.script package that allows any Java application to read, interpret and execute JavaScript scripts at run-time[3][4]. The Java developer can make objects and variables that are part of the host application available to the JavaScript code using a Bindings object. These aspects of the running application can then be accessed and manipulated at run-time from JavaScript in a similar manner to the way that client-side scripts access the DOM of a displayed page in a web browser.[5]

Each of these applications provides its own object model which provides access to the host environment, with the core JavaScript language remaining mostly the same in each application.

Debugging

JavaScript debugging has some specifics in comparison with stand-alone applications. JavaScript programs usually rely on interaction with the loaded page's Document Object Model (DOM) so errors may be caused by wrong DOM usage in a technically correct script. This makes JavaScript errors difficult to find. However nowadays both Internet Explorer and the Gecko-based browsers come with a reasonably good JavaScript debugger. Gecko browsers use the Venkman debugger or the Firebug debugger for Mozilla Firefox. Client-side JScript in Internet Explorer can be debugged with Microsoft Script Debugger. Microsoft Visual Studio can be used to debug server-side and command-line JScript[6]. Microsoft also provides Microsoft Script Editor (MSE) as part of their Microsoft Office package for scripts embedded in Microsoft Office documents[7]. There are also some free tools such as JSLint, which will scan JavaScript code looking for problems[8].

Since JavaScript is interpreted, loosely-typed, and, when run at the client-side, may be hosted in varying environments, applications, implementations and versions, the programmer has to take extra care to make sure the code executes as expected in as wide a range of circumstances as possible, and that functionality degrades nicely when it does not.

Each script block is parsed separately. On web pages where JavaScript in script blocks is mixed with HTML, syntax errors can be identified more readily by keeping discrete functions in separate script blocks, or (for preference), using many small linked .js files. This way, a syntax error will not cause parsing/compiling to fail for the whole page, which can help to enable a dignified death.

Security

As JavaScript is a rich interpreted language running arbitrary server-provided code on a client computer, it has suffered its fair share of security issues. Many attempts at bypassing logical barriers to steal confidential information make use of JavaScript to perform their deeds behind the scenes, using techniques such as cross-site scripting (XSS). Non-expert users usually can't notice what is going on because the malicious code has no visible effect on their browsing experience. Besides, it is not obvious to people who are not programmers that their Web browser includes a full-blown programming language interpreter, with the power and risks implied.

Java has similar security issues but these are considered less serious because the Java virtual machine provides a well-defined sandboxing model and few Web sites today (as of 2006) require Java, whereas many use JavaScript.

Related languages

There is no real relationship between Java and JavaScript; their similarities are mostly in basic syntax because both are ultimately derived from C. Their semantics are quite different and their object models are unrelated and largely incompatible. Like C and C++, all Java variables and members are statically typed, whereas all JavaScript variables (as well as object properties and array elements) may hold a value of any type.

To avoid trademark issues, Microsoft named its implementation of the language JScript. JScript was first supported in Internet Explorer version 3.0, released in August 1996.

The standardization effort for JavaScript also needed to avoid trademark issues, so the ECMA 262 standard calls the language ECMAScript, three editions of which have been published since the work started in November 1996. The object model of browser-based JavaScript, the Document Object Model (DOM), is not part of the ECMAScript standard. It is defined in a set of separate standards developed by the W3C, and is applicable to the access and manipulation of HTML and XML documents in many computer languages and platforms.

Microsoft's own VBScript, like JavaScript, can be run client-side in web pages. VBScript has syntax derived from Visual Basic and will only run if the web pages are viewed in Internet Explorer.

ActionScript, the programming language used in Macromedia Flash, is another implementation of the ECMAScript standard.

JSON, or JavaScript Object Notation, is a general-purpose data interchange format that is defined as a subset of JavaScript.

JavaScript OSA (JavaScript for OSA, or JSOSA), is a scripting language for Mac OS based on the Mozilla 1.5 JavaScript implementation, SpiderMonkey. It is a freeware component made available by Late Night Software. Interaction with the operating system and with third-party applications is scripted via a MacOS object. Otherwise, the language is virtually identical to the core Mozilla implementation. It was offered as an alternative to the more commonly used AppleScript language.

ECMAScript was included in the VRML97 standard for scripting nodes of VRML scene description files.

JavaScript is also considered a functional programming language like Scheme and OCaml because it has closures and supports higher-order functions.[9]

javascript news and javascript articles

Here's our top rated javascript links for the day:

Popular sites carrying Javascript attacks 

Web Host Directory - Feb 08 2:16 AM
www.virusbtn.com reports "Malicious Javascript has been planted on numerous legitimate websites over the weekend, attempting to take advantage of known flaws in Windows to download and activate keylogger and backdoor trojans on machines which browse the sites."

WEATHER FIRST 5/30 
KOAA - 2 hours, 46 minutes ago
In order to view our online videos, you must have Javascript enabled and the newest version of Macromedia Flash Player installed. You can get the newest version of Flash player here . Once Javascript has been enabled and the newest version of Flash Player has been installed, this message will be replaced with our video player and you can then enjoy our online videos.

College results 
The Columbus Dispatch - Feb 09 4:54 AM
Javascript is disabled in your browser. To use all the features of this site, please enable it. For a text-only version of Dispatch.com click here.

Thank you for viewing the javascript page javascript. 

 

Ever wondered what others are searching for in relation to javascript? Now you can see.  Below is a listing of  what everyone else is searching for in regard to javascript.

1. javascript
2. free javascript
3. javascript download
4. javascript tutorial
5. return unencoded url in javascript
6. javascript errors video higher computer internet player
7. javascript examples
8. javascript reference
9. enable javascript
10. javascript palindrome program
11. javascript redirect
12. javascript debugger
13. download javascript
14. free javascript search
15. javascript tutorials
16. javascript download free
17. javascript calendar
18. javascript file upload
19. javascript menu
20. javascript code
21. javascript alert
22. javascript password verification
23. javascript array
24. how to enable javascript
25. what is javascript
26. javascript functions
27. javascript snow
28. javascript search browser catalog library
29. javascript proxies
30. javascript codes
31. javascript substring
32. javascript replace
33. javascript gallery
34. javascript source
35. dynamically populated drop-down menus javascript
36. javascript editor
37. javascript catalog browser library support
38. palindrome javascript code
39. javascript files directories client side
40. turn on javascript
41. javascript turned off
42. select box events javascript
43. javascript slideshow
44. javascript livewire download
45. javascript sample
46. windows 98 javascript problems
47. gridview javascript textbox value
48. javascript onclick
49. javascript rollover
50. javascript timer
51. javascript forms
52. freeware javascript photo album
53. javascript downloads
54. learn javascript
55. slideshow javascript
56. javascript resources
57. javascript wait
58. free javascript download
59. change select dynamically in javascript
60. javascript files directories
61. javascript help
62. javascript menus
63. javascript search engine
64. javascript free
65. javascript confirm
66. date validator javascript
67. debug javascript
68. download a free javascript
69. fractal javascript
70. dropdown menu javascript
71. looping pictures javascript
72. javascript print
73. javascript login
74. free javascript debugger
75. javascript close window
76. javascript palindrome checker program
77. javascript tabs free
78. search library catalog javascript select
79. javascript operators
80. rewrite javascript
81. free javascript menu
82. javascript onmouseover
83. javascript arrays
84. javascript date
85. javascript objects and methods
86. javascript games
87. javascript histogram
88. javascript function
89. numbers into words javascript
90. javascript eval
91. javascript settimeout
92. javascript photo album
93. free javascript codes
94. calendar javascript
95. base64 encoding in javascript
96. javascript edito
97. chm javascript
98. convert html to javascript
99. javascript breadcrumbs
100. alert javascript