Discussion :  SOU CS Classes The fastest message board... ever.
Forum for discussion, questions, and replies relating to Web Development I 
Goto Thread: PreviousNext
Goto: Forum ListMessage ListNew TopicSearchLog In
Week 6 - Wednesday Discussion
Posted by: harveyd (IP Logged)
Date: October 31, 2007 04:43PM

1.Find a debugging tool to help find JavaScript errors. Tell us about it.
2.What is an object?
3.What is a property?
4.What is a method?
5.What is a form?
6.Describe the document object model.
7.Tell us something about the browser's window object.
8.Tell us something about the browser's history object.
9.Tell us something about the browser's location object.
10.Tell us something about the browser's window object.
11.What is the default browser object?
12.Give examples of browser objects (not window, history, location, and window).
13.How do you find the properties and methods in a browser object?
14.How does the document object model relate to JavaScript?
15.What is a hidden field? Why is it useful?
16.What is string concatenation?
17.What are two event type attributes? Tell us something about them.
18.What are disadvantages with submitting forms by e-mail?
19.Why are tables and forms often used together?
20.How do you enter a password in HTML?
21.How can forms be encrypted when sent to a server?
22.Tell us something we would find interesting about CGI.
23.Tell us something interesting about the history of the Document Object Model.
24.What is Dynamic HTML?
25.Find an article that discusses client side vs. server side form processing.

Re: Week 6 - Wednesday Discussion
Posted by: (IP Logged)
Date: October 31, 2007 09:10PM

2.What is an object?

An object is a series of methods and properties. Objects are tags, and methods are actions.

5.What is a form?

A form is a group of GUI objects that users can type data into or select a field. These objects include check boxes, text fields, radio buttons, menus, etc.


15.What is a hidden field? Why is it useful?

A hidden field is an area within a form that is hidden to the user but contains information that is useful for whoever recieves the form information, such as the date or time the form was submitted.

Re: Week 6 - Wednesday Discussion
Posted by: (IP Logged)
Date: November 02, 2007 10:37PM

1.Find a debugging tool to help find JavaScript errors. Tell us about it.

Types of errors
Syntax (grammatical and spelling errors)
Logic or run-time (when the program runs)
Management (i.e. Failure to upload the correct version)
Browsers can help find syntax errors
Mozilla:
toolsweb developmentjavascript console
Toolsweb developmentjavascript debugger
Explorer
toolsadvancedenable script debugging
Note: I prefer Mozilla’s version
More complex debugging tools exist (beyond this course's scope)
Techniques for finding runtime and management errors
Desk check first to run eliminates obvious problems
You can isolate errors using alert messages

24.What is Dynamic HTML?

Dynamic HTML or DHTML is a collection of technologies used together to create interactive and animated web sites by using a combination of a static markup language (such as HTML), a client-side scripting language (such as JavaScript), a presentation definition language (Cascading Style Sheets, CSS), and the Document Object Model.

A DHTML webpage is any webpage in which client-side scripting changes variables of the presentation definition language, which in turn affects the look and function of otherwise "static" HTML page content, after the page has been fully loaded and during the viewing process. Thus the dynamic characteristic of DHTML is the way it functions while a page is viewed, not in its ability to generate a unique page with each page load.

Re: Week 6 - Wednesday Discussion
Posted by: (IP Logged)
Date: November 03, 2007 11:28PM

16.What is string concatenation?

String concatenation is the joining together of two separate strings. Let's say variable A contains the value of "My " which is a string of the characters "M", "y" and a space. Variable B contains the value "precious" which is a string of the characters "p", "r", "e", "c", "i", "o", "u", "s", and "!". So in this case, by combining the two variables, we would be concatenating the strings "My "+"precious!".

So, let's say we have a click button with a question on it and clicking the button would provide us with a pop-up answer to the question. This is what it would look like if we were to include the javascript along with the html (which is of course not allowed by XHTML, but for simplicity's sake we'll include it here):


<script type="text/javascript">
varA = "My "
varB = "precious!"
</script>

<form>
<input type="button"
value="What does Gollum say to the ring of power?"
onclick="alert(varA + varB);" /></form>

Note from Dan: Excellent response. Don't forget that 'var' is needed to declare variables. Example: var VarA = "My ";



Edited 1 time(s). Last edit at 11/05/2007 04:40PM by harveyd.

Re: Week 6 - Wednesday Discussion
Posted by: (IP Logged)
Date: November 04, 2007 11:18PM

25.Find an article that discusses client side vs. server side form processing.

An artical titled "Client Side or Server Side?" can be located at: [www.website-owner.com]

4.What is a method?

Methods define functions performed by an object. Making a reference to an object method is similar to referencing its property. Thus, document.write(); calls the write() method of the document object.

15.What is a hidden field? Why is it useful?

Hidden Fields are used to have a piece of data associated with a form, but you don't want it to appear to people filling out the form. An example of its use could be an e-mail address to send the form information to.

Re: Week 6 - Wednesday Discussion
Posted by: (IP Logged)
Date: November 06, 2007 04:37AM

6. The Document Object Model is the way JavaScript views a web page. The main object is the Window object, the window object is broken down into three separate objects: the Location object, the Document object, and the History object. The document object has many sub-levels. The first sub-level of the Document object is the HTML tag, the HTML object is broken down into a second level consisting of a Body object and a Head Object. Within the head object there is a third level consisting of a title object and a meta object. The third level of the body tag is one or many form object, the fourth level consists of a table object, followed by <TR> and <TD> objects, the seventh level is a select object followed by an option object. All objects within a DOM structure are broken down into series of methods and properties; methods are the action elements of an object and properties are their attributes.

Note from Dan: Much of the above is correct, but the definition can be clearer. DOM is a tree structure of objects that browsers make available to scripting languages like JavaScript.



Edited 1 time(s). Last edit at 11/19/2007 04:11PM by harveyd.

Re: Week 6 - Wednesday Discussion
Posted by: (IP Logged)
Date: November 07, 2007 11:54PM

I managed to find a firefox add-on that functions as a JavaScript debugger.

[addons.mozilla.org]

You must first open the debugger from the tools menu in firefox, then when you open a page it will load the code for that page into the code window.

You can then establish break points in the code which allow you to step through your code, the program then tells you if you are having problems with your code.

Re: Week 6 - Wednesday Discussion
Posted by: (IP Logged)
Date: November 18, 2007 11:00PM

2.What is an object? A collection of properties and methods.


5.What is a form? is a property of the document object and is lso an object in its own right.



Sorry, only registered users may post in this forum.
This forum powered by Phorum.