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 - Friday Discussion
Posted by: harveyd (IP Logged)
Date: October 31, 2007 04:46PM

1. What does the following JavaScript methods do? What object are they in? (answer at most two of these)
•back
•go
•forward
•write
•getElementById
•write
2.What is dot notation?
3.What happens (Each of these count as a separate question) if you create a form and:
i.The name attribute is left off the GUI objectes?
ii.Radio buttons have name attributes set to different values?
iii.Radio buttons don't have the value attribute set?
4.Explain how you access the data the user types into a text field.
5.What is a use for the '\n' text field?
6.Why does JavaScript allow both single and double quotes to surround strings?
7.Why does the valid JavaScript statement cause a HTML validation error:

if (hours < 12) pm = "a.m.";

8.In JavaScript, why doesn't '=' mean equal?
9.In JavaScript, what is the difference between '=' and '=='?
10.What does 'case sensitive' mean? How does this apply to JavaScript?
11.Explain how to create a group of radio buttons.
12.Explain how to create a group of check boxes.
13.How can JavaScript find which radio button or check box is selected.
14.Explain how you create a drop down menu.
15.What does the JavaScript reserved word 'this' mean?
16.How do we get JavaScript to process a form?
17.Suppose we want to use the alert method to display 'hello' on one line and 'world' on another. How do we do this in JavaScript?
18.How do you use JavaScript to find the object associated with an HTML tag that has it's id attribute set to 'myTag.'
19.How do you use JavaScript to find the object associated with an HTML tag that has its name attribute set to 'myTag.'
20.What does the '&' mean in CGI?
21.What does '%3a' mean in CGI?
22.What does the '+' mean in CGI?
23.What does 'return false' mean when processing a form in JavaScript?
24.What is a good discussion topic for future classes?
25.What would be a good lab project?
26.Create a test question that you think would be good to add to either the on-line lecture, for a synthesis question, or for a quiz. Answer your question.
27.What do you wish you knew at the start of the lab project?
28.What suggestions do you have for the on-line lectures, lab projects, power point slides, etc.?
29.What mistakes did you find in the on-line material?

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

2.What is dot notation?

The period is pronounced as "dot". The dot notation syntax shows that the indicated property belongs to the indicated object. We say "objectName-dot-propertyName."

5.What is a use for the '\n' text field?

The combination '\n' creates a new line.

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

10.What does 'case sensitive' mean? How does this apply to JavaScript?

JavaScript is a case-sensitive scripting language. What that means is that the language considers capital letters as completely different letters from lowercase. So things like "keywords" all need to be lowercase to be understood. On the other hand, methods (properties) use "camel-back" naming convention (first word is in lowercase and each successive first letter of each word is capitalized), for example, toArray(), lastModified(), and so on.


14.Explain how you create a drop down menu.

The drop-down menu is created by using a table. Example:
<table class="navbar" width="800">
<tr>
...[missing TD elements]
</tr>
</table>

Note from Dan: What about the select and option tags?



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

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

3. What happens if you create a form and the Radio buttons have name attributes set to different values?

Radio buttons must belong in groups. Unlike check boxes, radio buttons give you an either/or option; either its one radio button or the other--you can never have two radio buttons clicked at the same time. Because of this, radio buttons must be classified together and have the same values. If radio buttons have different values the browser will treat it as if each radio button is its own group and will therefore act more like a check box.

Re: Week 6 - Friday Discussion
Posted by: (IP Logged)
Date: November 08, 2007 12:01AM

11.Explain how to create a group of radio buttons.

Using the <input> tag with the type attribute set to "radio" one can create a basic radio button.

In a group of them one wants to give them to same name in order to reference them as a group.

The id attribute, however, should be unique as each radio button can be addressed individually.

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

7.Why does the valid JavaScript statement cause a HTML validation error:

if (hours < 12) pm = "a.m.";
I think it is because the < makes the validator confused because it wants you to fix it by puting &lt for the less than sign instead of reading it as for hours less than 12.

Re: Week 6 - Friday Discussion
Posted by: (IP Logged)
Date: December 03, 2007 06:02AM

8.In JavaScript, why doesn't '=' mean equal?
qual means assignment is most programming languages. The expression on the right of the equal sign gets evaluated and the result stored on the left side.
9.In JavaScript, what is the difference between '=' and '=='?
= is asigning to and == means eguals



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