- It allows many actions to be performed like, setting the browser's preferences and receiving the request from the servers for the client computer.
- The settings that are used gets saved on the client side on the features like actions buttons, appearance and printing.
- It allows easy launching of an application on the client computer with interactive data to be communicated between the server and the client.
- It allows reading and writing of files or directories on the client or server side.
- It allows easy capturing of the data that is live streamed from the server to the client machine for retransmission.
- It also allows to safe and secure the application from the outside world.
What is the use of DOM?DOM is also known as Document Object Model which is used to develop a model with documents or web pages containing objects like elements, links, etc. These objects can be manipulated or certain actions like add, delete or change of an element can be performed using this document object model. Through this change in attributes can be done to get all the list of all the elements in the document. The DOM model responds to API calls that result in documented level of DOM recommendation. It is used to support additional behavior on the web page and use of API give an extensible advantage over other models existing. DOM codes are reused to meet the requirement of the real world and to make all the program interoperable.
What is the importance of <SCRIPT> tag?
- The example is given as :
<SCRIPT> // Starting of the scripting language
//Your code here
</SCRIPT> --> // End of the scripting language
// your code here
Data entry validation : This tell that if the field of the form is filled out then during the processing of the server the client side can interact with it.
Dynamic HTML interactivity : It allows dynamic position of the data without using any other scripting language.
CGI prototyping : It allows more reduction of time to access the user interface before implementing the application of the CGI.
Window object :
This is the topmost object in the hierarchy. It represent the content area of browser window that consists of HTML documents. Each frame is also a window that has some actions inside it.
Document object :
This object gets loaded in a window and consists of objects of different kind in the model. It consists of the content that will be written in the script.
Form object :
Form objects are used for more interaction with the users. It represents the form elements inside <FORM>...</FORM> tag.
- Object naming is used to create script references to objects while assigning names to every scriptable object in the HTML code. The browsers that are script compatible looks for the optional tags and attributes that enables the assigning of a unique name to each object. The example is :
<form name=”dataEntry” method=get>
<input type=”text” name=”entry”>
<frame src=”info.html” name=”main”>
- The names act as a nametags through which the elements can be easily identified and easily located by the browsers. The references made for each object includes the object hierarchy from the top down. References are used to include names of each object that are coming in the window object. The object naming conventions are easy way to loacte the objects and the linking between them can be done more comfortably.
- These are the functions which perform the dynamic interaction with the user. The first statement execute the element when pressed submit button to send a form to a server. These two statements are related to only the form. The scripts that are invoked will have the write of the document as well and will be written as :
document.write(“Give the version “ + navigator.appVersion)
document.write(“ of <B>” + navigator.appName + “</B>.”)
<INPUT TYPE=”button” VALUE=”Hello” onClick=”window.alert (‘HELLO WORLD’)”>