How Client-Side Scripting Was Born

I met some guys from Perth Web Design and their insights were very enlightening that is why I am sharing you some of the things that I have learned from the meeting.

Adding a dynamic-state to web design through client-side scripting

The first browsers that were used in the web did not support web pages and web scripting languages known as client-side scripts were born to become the easiest way to add a dynamic state into web pages so that users can interact in different ways. JavaScript was one of the scripting languages. Those who knew how to use HTML were able to create web documents. HTML tags were used to describe how the document will be formatted and the browser will obey the command and show the formatted document to the user. However, HTML is only a simple text markup language and cannot respond to a user and make decisions. HTML cannot automate repetitive tasks and this is the reason why there was a need for the more sophisticated scripting languages.

Writing or changing scripts is fairly simple. If you were to change the client-side scripts, it is like changing a typical HTML document. As soon as you refresh the document on the browser, the change is immediately executed. Client scripts are processed in different times depending on the way that they have been written. For example; statements can appear in a script block although it is not part of a procedure, function or subroutine. These are what you call as global or inline scripts that are processed when the browser reads the page. Statements can also appear as a part of a procedure but they will not be executed immediately. They will first be parsed when the page is run to check for any syntax errors.

Scripts for event handling procedures, functions and subroutines may appear anywhere in the page but they will only be processed when necessary. You will usually find these types of scripts in the header of a page. Client-side scripts can also directly interact with a user by posting message boxes or dialog boxes. For example, if a user makes an error when entering a document, an error message will be displayed by the client script.

Share Button