2530 loCM Website
Day Six
Posted by senchent at 2005/07/01 10:34:06 PST
Edited at 2005/07/08 09:03:23 PST

Homework

  • Finish lab exercises for chapter 9 if not done so already.

  • Read chapter 10.

  • Do prelabs for chapter 10.

  • Project: Bring a list of bibliographic references related to your topic (books, journals, internet sources, newspapers, etc)

Prelab Answers

Chapter 9 Review Questions

1. false
2. false
3. true
4. a
6. a
8. a
9. c

Chapter 9 Exercises

9.3

<html>
<head>
<title>Problem 9.3</title>
<script type="text/javascript">
function cheers() {
alert("Way to go!")
alert("Fantastic")
}

function encouragement() {
alert("Don't give up. You can do it!")
}

function displayAll() {
encouragement()
cheers()
}
</script>
</head>

<body>
<script tpe="text/javascript">
displayAll()
</script>
</body>
</html>

9.7

<html>
<head>
<title>Problem 9.7</title>
<script type="text/javascript">
function threeCheers(cheer1, cheer2, cheer3) {
alert(cheer1 + ", " + cheer2 + ", " + cheer3)
//If you leave out the ", " in the alert, then the alert will display "HipHipHooray"
}
</script>
</head>

<body>
<script type="text/javascript">
threeCheers("Hip", "Hip", "Hooray")
</script>
</body>
</html>

9.9

<html>
<head>
<title>Problem 9.9</title>
<script type="text/javascript">
function displayFullName(first, middle, last) {
alert("Your full name is: " + first + " " + middle + " " + last)
//If you leave out the ", " then the alert will display "HipHipHooray"
}
</script>
</head>

<body>
<script type="text/javascript">
var firstName, middleName, lastName
firstName = prompt("Please enter your first name: ", " ")
middleName = prompt("Please enter your middle name: ", " ")
lastName = prompt("Please enter your last name: ", " ")
displayFullName(firstName, middleName, lastName)
</script>
</body>
</html>

2005/07/05 22:34:06 PST by Big Boi mari

<?xml version="1.0"?>
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www/w3/org/TR/xhtml/11/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Roleover Image</title>
<script type="text/javascript">

function switchImage(){
document.images[0].src = "Family Guy Peter.JPG"
}
function restoreImages(){
document.images[0].src="Princess.JPG"
}

</script>
</head>
<body>

<p>Cool a HOttie...</p>
<p><a href="An eventful Website.htm" onmouseover ="switchImage()"
onmouseout = "restoreImages()">
</p>

<p>
<img src="Princess.JPG" alt="Picture Of Lizzy"Width="300" height="240"
id="MyPrincess" Name="MyPrincess" />
</a></p>

</body>
</html>

2005/07/06 00:38:36 PST by ettubrutesbro
[ettubrutesbro's avatar]

Thanks for the rollover code. I'll check to see if it works / compare with my current nonworking one.

2005/07/07 22:43:46 PST by Niggar Man

<html>
<head>
<title>Global & Local</title>
<script type="text/javascript">
var name1 = "Elizabeth"
var name2 = "Anne-Marie"
var name3 = "Felix"
function testVariables(){
var name3 = "Bolmer"
alert("Your new last name is: " + name3)}
</script>
</head>
<body>
<script type="text/javascript">
alert("Name: " + name1 + " " + name2 + " " + name3)
testVariables()
</script>
</body>
</html>

2005/07/08 08:47:43 PST by senchent
Edited at 2005/07/08 09:01:15 PST
[senchent's avatar]

Hey good job + thanks for posting your answers online. I fell behind a bit in posting them (car accident). Thx- Trev.

"You better cut the pizza in four pieces because I'm not hungry enough to eat six." -Yogi Berra

2005/07/08 18:48:41 PST by TheGeeky101
[TheGeeky101's avatar]

Heh...I still can't get the image rollover to work. Oh well. Maybe I'll be able to do the slideshow thingy.

Powered by Io Community Manager