PASTE NAVIGATION MENU CODE

Saturday 3 March 2012

Javascript

| | with 0 comments |

History

Javascript was developed by Netscape in 1995 as an extension to its Netscape Navigator web browser. Through the language developers could write code to extend the web browser to provide additional functionality in their web pages. The original name of the project was LiveScript. Due to similarities with Java, the language was later renamed Javascript under license by Sun. Barring the name, there is no other similarity between Javascript and Java.

Starting with Internet Explorer 3.0, Microsoft also started including Javascript with their web browser. However, Microsoft made some ‘enhancements’ to Javascript which meant that code written for Netscape would not necessarily work the same way on Internet Explorer and vice versa. 

Due to this fragmentation, Javascript was relegated as a ‘toy’ language with most developers preferring not to use it or employ it for menial tasks such as form validation, scrolling status bars and endless pop-ups.

Re-Birth

In early 2002, developers started combining Javascript and XML through the now-famous XMLHttpRequest() function. This function allows a Javascript program to retrieve XML (and hence XHTML) data from a web server without refreshing the current page. This seemingly small advancement opened up a plethora of possibilities resulting in web pages being transformed from simple online catalogues to full-blown applications. 
Later, the combination of Javascript and XML was termed AJAX - Asynchronous Javascript and XML. The rise in the use of Javascript also led to its standardisation with projects such as CommonJS starting in 2009.

Libraries

Several frameworks have evolved around Javascript to allow to developers to achieve the functionality they want without having to start from scratch with every new web application. Frameworks such as jQuery provide a light-weight, cross-browser, CSS3 compliant implementation of Javascript functionality common to many sites, including AJAX requests,  events, effects, utilities and many more. Additionally, jQuery can be enhanced via a large number of plug-ins available online, which can make the library do almost anything. One very popular extension is jQueryUI, which provides user-interface interactive components for web applications such as drop-down calendars, progress bars, colour selectors, dialogs, pop-ups and more. 
With the rise of mobile devices, libraries such as jQuery also have mobile versions which provide the same functionality as their desktop counterparts. 
As the name implies, Javascript is similar in syntax to Java. The following snippet displays a pop-up to the user based on the user’s age.

var age = 18;
if (age >= 18) {
   alert (“You can drive a car!”);
} else {
   alert (“Catch an Arriva!”);
}
As can be seen, Javascript implements the braces syntax used by C-style programming languages. The language is short, but more expressive than C. 




Short Implementation

Please enter your name in this field
Please enter your surname in this field
Please enter a valid email address in this field








Post a Comment

Please enter your comments here..

0 comments: