Interactions between websites and users.

The web nowadays offers more than just static text. Modern web pages can often interact with the user. For these interactions small programs, which run on the client computer, are being put into an HTML document and so called CGI programs that run on the server. There are two types of small programs that run on a client's computer.

First of these types are scripts. These scripts are written in a language, which the browser can interpret, like JavaScript or VBScript. These scripts are contained within an HTML document or linked to it. They can use and manipulate the objects within a document. Examples of these objects are images, links, input elements, etc. With a script, for example you can change an image whenever the mouse hovers over it, making clear that this image is clickable.

Second are the applets. These are small programs written in a language called Java. These are quite different. They are not interpreted by the browser software, but run inside a virtual machine, a sort of computer inside your computer. These Java programs cannot use and manipulate the objects within an HTML document, and have to run inside a confined space inside a web page, but because Java is not an interpreted language like JavaScript, the programs are processed way faster.

CGI programs are programs that run on the web server. They get their input from a web page on the client computer and their output is a web page or image that will be sent to the client. They can be used to give a user requested information, like in a search engine, where the user enters his keywords and the CGI program checks it's database and returns links to sites about this keyword. CGI programs can also be used to gather user information. For more information about CGI, you can read the information processing section.

There are also other ways to add interactivity to a website like ActiveX and Shockwave Flash. However, ActiveX has some security loopholes and Flash requires the user to download a plug in and has quite limited capabilities compared to Java, we hardly ever use them.