Week 7 - Friday Discussion
Posted by:
harveyd (IP Logged)
Date: November 08, 2007 04:20PM
1. Write a function that displays "hello world" in a pop up.
2. Write a function that writes "hello world" into the web page.
3. Write a function that displays the title of the web-page in a pop up.
4. Create a form with a two text fields and a submit button.
5. Assume there is an html tag <input type="button" id="myButton" value="click here">. What is the javascript statement to print what appears in the value attribute for this button?
6. Display the value of a text field whose name attribute is set to text (name="text"). Assume the text field is in a form whose name attribute is form (name="form").
7. Display the value of a text field whose id attribute is set to data (id="data")
8. Display the "radio checked" if a radio button is checked whose id attribute is set to radioB (id="radioB").
9. Create a drop down menu with four items.
10. Create a form tag that submits the data to an email address.
11. Create a form with three radio buttons.
12. Create a form with three checkboxes.
13. Assume that there is a form with three radio buttons. The name attributes for all three buttons are set to "radioGroup." Write a JavaScript alert message that prints which one the user selected.
14. What are three ways to process an HTML form?
15. Give us an example of CGI.
16. Create a JavaScript variable with the string "abc" in it.
17. Declare a variable, x, with a random number between 0 and 3 in it.
18. Declare a variable, x, with a random number between 3 and 6 in it.
19. Assume that variable x holds the string "abc" and variable "y" holds the string "xyz." Create an alert method that uses concatenation using these variables to output "x = abc and y = xyz".
20. Tell us something interesting about CGI.
21. What are two event attributes (other than onClick)? Tell us what they are for.
22. What does the JavaScript prompt method do?
23. What does the JavaScript confirm method do?
24. What does 'null' mean in JavaScript?
25. Assume that there is a function defined as follows:
function doIt(a, b, c)
{ alert(b + a + c); }
What does doIt("cat","dog","mouse"); output?
26. What does alert("abc\n\'def\'"); output?
27. What is difference between "10"+"20" and 10+20?
28. What does alert(Math.sqrt(25)); print?
29. What does alert(Math.pow(2,3)); print?
30. Suppose we have a function defined as follows:
function doThis(a)
{ return a + 4; }
What does alert(doThis(doThis(3)); print?
31. Create an html tag displaying "pic.jpg" that switches the picture to "newpic.jpg" when the user moves the mouse over the picture. Change it back when the user moves the mouse away from the picture.
32. What is a good discussion topic for future classes?
33. What would be a good lab project?
34. 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.
35. What do you wish you knew at the start of the lab project?
36. What suggestions do you have for the on-line lectures, lab projects, power point slides, etc.?
37. What mistakes did you find in the on-line material?