To the table of contents
Client-side scripting language
To understand this, we need to recall the client-server model: data on the web is by means of HTTP transmitted (English Hypertext Transfer Protocol = Hypertext transmission protocol). This protocol uses a request-response model. The user's computer, called Client (English for customer) connects to the server (English for providers) and send a request. This can, for example, be the instruction to provide him with a specific address. The web server usually responds to this with a confirmation and sends back an HTML document, for example.
Cooperation between server and client-side programs
- The client sends an HTTP request to the server when the user activates a link or submits a form.
The server program usually does not run for more than a few seconds and then terminates. This ends the scope of the server program: It starts when a client request is received and ends before the generated HTML document is transmitted to the client.
This should show how server and client-side programs work together, but are still separate - because they run one after the other on different computers, work in a different environment and perform different tasks.
Document Object Model (DOM), Element Objects, and Nodes
After looking at the transfer of HTML documents from the web server to the browser, we need to see how the browser processes the document.
The HTML code is initially available to the browser as plain text. While the browser is still receiving the code over the network, it processes it piece by piece. The so-called Parser (English parse = break a sentence down into its grammatical parts). The parser converts the HTML code into an object structure, which is then stored in the main memory. - With object what is meant here is a bundle of information in memory. - This object structure consists of nested node, above all element nodes and text nodes that are arranged in a tree structure.
Windows and documents
The object is attached to this as a sub-object. It maps the HTML document that is displayed in the window.
With window is usually meant a normal browser window. However, several HTML documents can also be displayed in one browser window. This is the case with frames, inner frames (iframes), and pop-up windows. Each of these nested windows has its own - and - objects.
At the moment when the browser reads the HTML code, transfers it to the said object structure and calculates the representation, all scripts linked to the document are also executed.
- A key is pressed on the keyboard (event type:)
- An element in the document is clicked with the mouse (event type:)
In addition to these events that are directly related to user input such as keystrokes and mouse clicks, there are those that relate to interaction with forms:
- A form field is focused ()
- The text in a form field is changed ()
- A form is being sent ()
Finally, events that relate to the entire window or the document can also be monitored:
- The document was completely loaded with all graphics and style sheets, its object structure is completely available ()
- The size of the browser window is changed ()
To monitor an event, three components are necessary:
- The spot, Where the event is to be monitored: window-wide, document-wide or at a specific element in the document.
- The Type of the event. For example, that means all mouse clicks.
You can find out more about this in the chapter Basics of Event Processing.
- Works iOS 8 on iPhone 4
- Amputation is a disability
- How hackers hack HBO
- Why are you so biased
- What kind of woman is pretty
- Amtrak trains have toilets
- Why is there 24 hours of sunlight
- Is Cavatelli a real Italian dish
- What is 1 2 x 2 9
- What should everyone know about your city
- What's your rating of SpreeCommerce
- ENTPs like to plan
- What is the export to GDP ratio
- What are EC motors
- Is blogging still profitable
- What is spiritual abundance
- How many supercomputers does India have
- What is XYZ Analysis
- What is Abinitio Training
- Why do lightning strikes occur
- Why should Airbnb remove Keyword Search?
- What is Diane Lane's best film role
- How does Obama call Putin
- What is ettringite in cement