Week 8 - Friday Discussion
Posted by: harveyd
Date: November 12, 2007 07:36PM
1. Create a pop up window that displays 'mypage.htm'.
2. What needs to change in question 1 to make the window resizable and size 100x100 pixels.
3. Create a popup window containing the HTML for a simple web-page. This question can have more than one answer.
4. Assume x=3, y=4, z=-1, s="abc" t="ABC" u="abcd" v="ABCD". True or False? (answer at most two of these).
5. What alerts? (answer at most two of these)
i. var x=1; alert(x++);
ii. var x=1; alert(++x);
iii. var x=4; x*= 2; alert(x);
iv. var x=4, y=3; alert(++x + ++y);
v. var x=4, y=3; alert(++x + y++); alert(x+y);
vi. var x=4, y=3; alert(++x + ++x);
6. Write an 'if' statement that alerts 'hello' if x<y and alerts 'goodby' otherwise.
7. Write 'if' statements that based on a month (from one to twelve) and year will alerts the number of days in the month.
8. Modify the previous question to handle leap years. (The % operator means remainder - month%4==0 for leap years).
9. Write an 'if' statement that alerts three times ('time1', 'time2', and 'time3') when x<=y.
10. Write an 'if' statement that prints 'ok' if x contains a valid number.
11. Declare a variable with a random number between 0 and 10.
12. Declare a variable with a random number between 4 and 9.
13. Convert the value in a GUI text field to an integer. The text field has its id attribute set to "textField".
14. Declare a variable with a random number between -3 and 5.
15. What is a good discussion topic for future classes?
16. What would be a good lab project?
17. 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.
18. What do you wish you knew at the start of the lab project?
19. What suggestions do you have for the on-line lectures, lab projects, power point slides, etc.?
20. What mistakes did you find in the on-line material?