|
Featured Papers from Direct Essays
|
|
|
|
|
|
This is a preview of a paper to view the full text you need to signup and login.
|
Advanced Scripting
|
|
|
Assignment 1: Questions should be taken from all learning outcomes and should cover the theoretical aspects of scripting, including definitions of terms and correcting (but not writing under exam conditions) fragments of code. 5% - Explain the “Document Object Model” 5% - What is object-oriented programming? 5% - What is an Active-X Control? 5% - Give a simple description of the W3C. - It’s history. - What does it do? - Who runs it? - What are some examples of its current work/standards? Section 1:- Explain the “Document Object Model” (5%) The W3C (World Wide Web Consortium) define the DOM (The Document Object Model) as follows: “The Document Object Model is a platform- and language-neutral interface that will allow programs and scripts to dynamically access and update the content, structure and style of documents. The document can be further processed and the results of that processing can be incorporated back into the presented page. “ The DOM consists of four main parts, according to “The Web developers Libary” (http://wdvl.com/Authoring/DHTML/DOM/). These are: Objects, Properties, Methods and Events. Objects Container which reflects a particular element of a page; objects "contain" the various characteristics which apply to that element (known as properties and methods); example: the submit object contains properties and methods relevant to the submit button in a form. Properties Characteristics of an object; for example, the document object possesses a bgColor property which reflects the background color of the page. Using a programming language (e.g. JavaScript) you may, via this property, read or modify the color of the current page. Some objects contain very many properties, some contain very few. Some properties are read-only while others can be modified, possibly resulting in immediate on-screen results. Methods A method typically executes an action which somehow acts upon the the object by which it is owned. Sometimes the method also returns a result value. Methods are triggered by the programming language being used, such as JavaScript. For example, the window object possesses a method named alert(). When supplied with string data, the alert() method causes a window to pop up on the screen containing the data as its message; e.g. alert("Invalid entry!"). Events An event is used to trap actions related to the object that owns it; typically, these actions are caused by the user. For example, when the user clicks on a submit button, this is a click event which occurs at the submit object. By virtue of submitting a form, a submit event is also generated, following the click event. Although these events occur transparently, you can choose to intercept them and trigger specified program code to execute. As can be gleaned from the above information, the DOM isn’t something you master by memorizing it. If you instead learn how it is structured and how to understand its references, you can easally mold it to suit your needs. The DOM is designed to be “a standard programming interface that can be used in a wide variety of environments and applications” (IE cross compatible). The DOM is, (essentually) a programming API (Application Programming Interface) for documents. It is based on an object structure that closely resembles the structure of the documents it models. For example, below is the HTML code for a table: | Shady Grove | Aeolian | | Over the River, Charlie | Dorian | According to the structure of the DOM, documents are represented in a tree structure. The above table wounld be represented represented as follows: The name "Document Object Model" was chosen because it is an "object model": documents are modeled using objects, and the model covers not only the structure that a document should take, but also the behavior of a document and the objects of which it is made up of. As a Object Model: the DOM encompasses: • The interfaces and objects used to represent and manipulate a document (IE web document viewed through an internet browser). • Interfaces and objects - including both behaviors and attributes • The relationships among these interfaces and objects, and how they interrelate. The XML Object Model The XML object model enables a means by which you can navigate and manipulate an Extensible Markup Language (XML) document. An XML document is a treelike structure, starting with the top-level element (its root), below which are its descendants/ elements (Children and Siblings).
|
|
|
To link to this page, copy the following code to your site:
|
|
Paper Information
|
|
|
Title: Advanced Scripting
Words: 3519 Rating: None Pages: 14.1 submitted by: lorddamo
If you think this paper shouldn't be here then
|
|
|
|
|
Signup & Login
|
|
|
If you don't currently have a login then Signup here
|
|
|
|
|
Pre-Written Papers
|
|
|
|
|
|
|
|
Custom Papers
|
|
|
|
|
|
|
|