world property bulgaria header

Javascript Information


What is JavaScript?

JavaScript is a simple scripting language invented specifically for use in web browsers to make websites more dynamic. On its own, HTML is capable of outputting more-or-less static pages. Once you load them up your view doesn't change much until you click a link to go to a new page. Adding JavaScript to your code allows you to change how the document looks completely, from changing text, to changing colours, to changing the options available in a drop-down list (and much, much more!).

JavaScript is a client-side language, which means all the action occurs on the client's (reader's) side of things. This means that no trips to the server are required for JavaScripts to kick into operation, which would slow down the process enormously. JavaScript operations are usually performed instantaneously. In fact, JavaScript is often used to perform operations that would otherwise encumber the server, like form input validation. This distribution of work to the relatively quick client-side service speeds up the process.

JavaScripts are integrated into the browsing environment, which means they can get information about the browser and HTML page, and modify this information, thus changing how things are presented on your screen. This access to information gives JavaScript great power to modify the browsing experience. They can also react to events, such as when the user clicks their mouse, or points to a certain page element. This is also a very powerful ability.

Most importantly, JavaScript isn't overly tough to learn and use. It's a little technical, yes; but after just a few tutorials you'll have some useful scripts in your pages, and will have the knowledge necessary to modify and use the countless free scripts available across the web.


CSS Information HTML Information XHTML Information JavaScript Database Contact




JavaScript is written in the same way as HTML, in a text-editor. JS implementation is quite similar to CSS; you can link to outside files (with the file extension .js), or write blocks of code right into your HTML documents with the <script> tag. The usual choosing criteria apply, if you're using the same script on many pages, link to an external file; otherwise embed into the <head> tag.


The DOM, or Document Object Model, is the framework that JavaScript works off. Remember how I said JavaScript is a form of Object-oriented programming? This concept means we can think of all the elements that go into making a page as objects. The document itself is an object, made up of other objects like forms, images and tables. Form objects are also made up of even more objects like text boxes and submit buttons.
    All of these objects have properties, with values that define their colour, their length etc. JavaScript can read these properties and modify them, or react to events that happen to the objects, instantly changing the object in the browser window. A script can respond to user interaction with the page or can run all by itself.

Actions that your script performs on or with objects are called methods. These are functions built-into objects. Dealing with user-controlled events like clicks and mouse movement is accomplished through commands called event handlers. Together, these concepts form the basis of all JavaScript programming.

The DOM allows you to access these page objects. As mentioned above, for years there has been a bad situation wherein the two major browsers supported different versions of the DOM. Netscape's DOM was not compatible with Microsoft's, and soDHTML (Dynamic HTML) pages written to perform in one browser would not function in another. Recently, the W3C have standardised the model, creating the DOM level 1.

sevensense link image


©Website Design