Refactor. JS time!
BIN
Assignments/JavaScript/JavaScript_1/public_html/carla/.DS_Store
vendored
Executable file
142
Assignments/JavaScript/JavaScript_1/public_html/carla/carla.css
Executable file
@@ -0,0 +1,142 @@
|
||||
body {
|
||||
background-color: #FFFFFF;
|
||||
background-image: url(background.gif);
|
||||
color: #0000FF;
|
||||
font-family: Geneva, Arial, Helvetica, sans-serif;
|
||||
font-size: 14px;
|
||||
}
|
||||
#container { margin-left: auto;
|
||||
margin-right: auto;
|
||||
width:90%;
|
||||
min-width:700px;
|
||||
}
|
||||
|
||||
|
||||
#logo {
|
||||
text-align:center;
|
||||
margin: 0;
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
padding-top: 30px;
|
||||
padding-bottom: 20px;
|
||||
|
||||
}
|
||||
#nav {
|
||||
float: left;
|
||||
width: 200px;
|
||||
padding-top: 10px;
|
||||
text-align:left;
|
||||
color: #FF0000;
|
||||
font-size: 14px;
|
||||
}
|
||||
#nav a {
|
||||
text-decoration:none;
|
||||
margin: 15px;
|
||||
display: block;
|
||||
color: #FF0000;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
}
|
||||
#content {
|
||||
margin-left: 150px;
|
||||
padding: 30px;
|
||||
overflow:auto;
|
||||
border: medium groove #0000FF;
|
||||
line-height: 135%;
|
||||
|
||||
}
|
||||
|
||||
.floatright {padding-left:20px;
|
||||
float:right;
|
||||
}
|
||||
.floatleft {
|
||||
float:left;
|
||||
padding: 2px 30px 20px;
|
||||
}
|
||||
#footer {
|
||||
font-size: 16px;
|
||||
font-style: normal;
|
||||
text-align: justify;
|
||||
border-top: thin none;
|
||||
padding-top: 20px;
|
||||
padding-bottom: 20px;
|
||||
color: #FF0000;
|
||||
font-family: Georgia, "Times New Roman", Times, serif;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
h2 { text-transform: uppercase;
|
||||
color: #0000FF;
|
||||
font-size: 36px;
|
||||
border-bottom: 1px none;
|
||||
margin-right: 20px;
|
||||
}
|
||||
h3 {
|
||||
color: #0000FF;
|
||||
font-size: 1em;
|
||||
border-bottom: thin none;
|
||||
margin-right: auto;
|
||||
text-align: left;
|
||||
padding-right: 150px;
|
||||
padding-bottom: 20px;
|
||||
padding-left: 150px;
|
||||
line-height: 130%;
|
||||
border-top-style: none;
|
||||
border-right-style: none;
|
||||
border-left-style: none;
|
||||
}
|
||||
.details { padding-left:20%;
|
||||
padding-right:20%;
|
||||
}
|
||||
img {border:0 none; }
|
||||
|
||||
.content {
|
||||
margin: 20px;
|
||||
padding: 20px;
|
||||
height: 3700px;
|
||||
width: 500px;
|
||||
}
|
||||
a {
|
||||
color: #FF0000;
|
||||
text-decoration: none;
|
||||
margin: 15px;
|
||||
color: #FF0000;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
}
|
||||
a:hover {
|
||||
color: #FFFF00;
|
||||
background-color: #0000FF;
|
||||
}
|
||||
h4 {
|
||||
line-height: 150%;
|
||||
margin-right: 20%;
|
||||
margin-left: 15%;
|
||||
text-align: center;
|
||||
}
|
||||
h1 {
|
||||
font-family: Geneva, Arial, Helvetica, sans-serif;
|
||||
font-size: 36pt;
|
||||
text-align: center;
|
||||
margin-right: 15%;
|
||||
margin-left: 20%;
|
||||
}
|
||||
p {
|
||||
font-family: Georgia, "Times New Roman", Times, serif;
|
||||
font-size: 16px;
|
||||
line-height: 130%;
|
||||
font-weight: bold;
|
||||
color: #0000FF;
|
||||
}
|
||||
.flt_img {
|
||||
float: none;
|
||||
padding-top: 3px;
|
||||
padding-right: 20px;
|
||||
padding-bottom: 3px;
|
||||
padding-left: 20px;
|
||||
}
|
||||
specialh4 {
|
||||
line-height: 150%;
|
||||
margin-right: 20%;
|
||||
margin-left: 15%;
|
||||
text-align: center;
|
||||
}
|
||||
89
Assignments/JavaScript/JavaScript_1/public_html/carla/carla_spelling.html
Executable file
@@ -0,0 +1,89 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<title>Carla's Classroom | An Appetite for Spelling</title>
|
||||
<link href="carla.css" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript">
|
||||
//declare and initialize variables
|
||||
var word1 = "avocado";
|
||||
var word2 = "bananas";
|
||||
var word3 = "celery";
|
||||
var word4 = "lemonade";
|
||||
var word5 = "onions";
|
||||
var result = " ";
|
||||
// Question 1
|
||||
function show_prompt1()
|
||||
{
|
||||
word1 = prompt("Enter your answer");
|
||||
result = (word1 == "avocado")? "You're right!" : "Sorry, that's incorrect";
|
||||
}
|
||||
function show_result1()
|
||||
{ alert(result); }
|
||||
//Question 2
|
||||
function show_prompt2()
|
||||
{
|
||||
word2 = prompt("Enter your answer");
|
||||
result = (word2 == "bananas")? "You're right!" : "Sorry, that's incorrect";
|
||||
}
|
||||
function show_result2()
|
||||
{ alert(result); }
|
||||
//Question 3
|
||||
function show_prompt3()
|
||||
{
|
||||
word3 = prompt("Enter your answer");
|
||||
result = (word3 == "celery")? "You're right!" : "Sorry, that's incorrect";
|
||||
}
|
||||
function show_result3()
|
||||
{ alert(result); }
|
||||
//Question 4
|
||||
function show_prompt4()
|
||||
{
|
||||
word4 = prompt("Enter your answer");
|
||||
result = (word4 == "lemonade")? "You're right!" : "Sorry,that's incorrect";
|
||||
}
|
||||
function show_result4()
|
||||
{ alert(result); }
|
||||
//Question 5
|
||||
function show_prompt5()
|
||||
{
|
||||
word5 = prompt("Enter your answer");
|
||||
result = (word5 == "onions")? "You're right!" : "Sorry, that's incorrect";
|
||||
}
|
||||
function show_result5()
|
||||
{ alert(result); }
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<img src="images/writing_big.jpg" class="floatleft" />
|
||||
<h1 id="logo"><em>An Appetite for Spelling </em></h1>
|
||||
<div align="left">
|
||||
<blockquote>
|
||||
<p><a href="index.html"><img src="images/owl_button.jpg" width="50" height="50" />Home</a>
|
||||
<a href="carla.html"><img src="images/carla_button.jpg" width="50" height="65" />Meet Carla </a>
|
||||
<a href="reading.html"><img src="images/read_button.jpg" />Reading</a>
|
||||
<a href="writing.html"><img src="images/write_button.jpg" width="50" height="50" />Writing</a>
|
||||
<a href="math.html"><img src="images/arith_button.jpg" />Arithmetic</a>
|
||||
<br /></p></blockquote> </div>
|
||||
<div id="content">
|
||||
<p>For this exercise you will be shown some pictures and, for each picture you will be asked to spell the word that describes the picture. Type your answers in all lowercase letters. </p>
|
||||
<p>Question 1: What is this? <img src="images/avocado.jpg" width="100" height="67" /></p>
|
||||
<input type="button" onclick="show_prompt1()" value="answer Q. 1" />
|
||||
<input type="button" onclick="show_result1()" value="check answer" />
|
||||
<p>Question 2: What's this? <img src="images/bananas.jpg" width="100" height="110" border="0"></p>
|
||||
<input type="button" onclick="show_prompt2()" value="answer Q. 2" />
|
||||
<input type="button" onclick="show_result2()" value="check answer" />
|
||||
<p>Question 3: What's this? <img src="images/celery.jpg" border="0"> </p>
|
||||
<input type="button" onclick="show_prompt3()" value="answer Q. 3" />
|
||||
<input type="button" onclick="show_result3()" value="check answer" />
|
||||
<p>Question 4: What's this? <img src="images/lemonade.jpg" width="100" height="93" border="0"> </p>
|
||||
<input type="button" onclick="show_prompt4()" value="answer Q. 4" />
|
||||
<input type="button" onclick="show_result4()" value="check answer" />
|
||||
<p>Question 5: What's this? <img src="images/onions.jpg" width="100" height="72" border="0"></p>
|
||||
<input type="button" onclick="show_prompt5()" value="answer Q. 5" />
|
||||
<input type="button" onclick="show_result5()" value="check answer" />
|
||||
</div>
|
||||
<div id="footer"> <h3>*Carla's Motto: Never miss a chance to teach -- and to learn!</h3>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
BIN
Assignments/JavaScript/JavaScript_1/public_html/carla/images/arith_button.jpg
Executable file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
Assignments/JavaScript/JavaScript_1/public_html/carla/images/avocado.jpg
Executable file
|
After Width: | Height: | Size: 4.8 KiB |
BIN
Assignments/JavaScript/JavaScript_1/public_html/carla/images/bananas.jpg
Executable file
|
After Width: | Height: | Size: 4.6 KiB |
BIN
Assignments/JavaScript/JavaScript_1/public_html/carla/images/carla_button.jpg
Executable file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
Assignments/JavaScript/JavaScript_1/public_html/carla/images/carla_pic.jpg
Executable file
|
After Width: | Height: | Size: 6.6 KiB |
BIN
Assignments/JavaScript/JavaScript_1/public_html/carla/images/celery.jpg
Executable file
|
After Width: | Height: | Size: 6.7 KiB |
BIN
Assignments/JavaScript/JavaScript_1/public_html/carla/images/lemonade.jpg
Executable file
|
After Width: | Height: | Size: 4.5 KiB |
BIN
Assignments/JavaScript/JavaScript_1/public_html/carla/images/onions.jpg
Executable file
|
After Width: | Height: | Size: 8.5 KiB |
BIN
Assignments/JavaScript/JavaScript_1/public_html/carla/images/owl_button.jpg
Executable file
|
After Width: | Height: | Size: 527 B |
BIN
Assignments/JavaScript/JavaScript_1/public_html/carla/images/owl_logo.jpg
Executable file
|
After Width: | Height: | Size: 7.6 KiB |
BIN
Assignments/JavaScript/JavaScript_1/public_html/carla/images/read_button.jpg
Executable file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
Assignments/JavaScript/JavaScript_1/public_html/carla/images/write_button.jpg
Executable file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
Assignments/JavaScript/JavaScript_1/public_html/carla/images/writing_big.jpg
Executable file
|
After Width: | Height: | Size: 8.0 KiB |