Navigation by SELECTion



Choose a JavaScript example

[JavaScript] [Server-side] [Client-side] [Java differs from JavaScript] [HTML] [J++] [Home]

WEB FAQs


What is JavaScript?
   JavaScript is one of a number of scripting languages recently developed to liven up web pages and to make web pages more interactive.  The client side code is contained in a number of places:


When accessing a web page on the Internet the client only logs on to the remote web server to download a web page and any associated graphics files.  These files are then saved in a history folder on the clients own computer and allows then to carry on browsing the page in local mode (an example of distributed processing).  The client only transmits signals over the web again when making a request for a new link or to refresh an out of date page.  

As the downloaded files contain all of the JavaScript, the code is interpreted at run time.  This is very useful in the case of web sites that sell services.  These often require the user to complete a forms, JavaScript can carry out calculations to give a quote or error check the form for correct completion before the data is submitted back to the host web page, saving unnecessary traffic over the Web.  If everyone stayed permanently connected to the server, both it and the WWW network would find it extremely difficult to provide sufficient bandwidth to satisfy all users and would either become very slow or, worse still, fail.

JavaScript can also be written on the server-side and use as CGI script but PERL is a more popular language for this.

Top of page

What is server-side?  JavaScript is a very powerful language and malicious code could cause a web server to fail.  For this reason a client is not normally allowed access to the server side.  Only the web server administrator/s has access

What is client side? By allowing user permissions on a web server an ISP provider will allow a client (you) to place files for your web page which are accessible to other users of the web.  Most of your web page code will be in HTML but you can also intermix a whole range of other languages as well.  The code that you write will normally only work in this web page.

How does JavaScript differ from Java?   Java is a fully compiled language.  That is, it has to converted (compiled) into a language that the computer understands (machine code).  Once compiled it is not possible to edit in the normal way.  However, because it is already in a format recognised by the processor it is considered to be faster than JavaScript which has to be converted (interpreted) at run time by the clients browser.  

What are the benefits of programming languages in HTML? HTML code is transparent in that the client's browser is specific to their computer.  The browser has the ability to convert the code into a format that is understandable by the computer set up. Therefore by using a standard program across the web a PC can communicate with an Apple Mac or any other type of computer that would not normally be able to talk to one another.  The programmer only has to write one program which can be understood by all.

What is J++? There are two main contenders to be the standard browser, Netscape and Internet Explorer (Microsoft). Originally JavaScript code was developed for cable television boxes and for the web.  In earlier versions of IE JavaScript was not catered for and later Microsoft developed their own version J++.  Whilst IE currently seems to be winning the battle for browsers it would appear that JavaScript is the more popular of the two scripting languages, although they are more or less compatible with one another these days.

Top of page