/*
JavaScript Unleashed, Third Edition
by Richard Wagner and R. Allen Wyke
ISBN: 067231763X
Publisher Sams CopyRight 2000
*/
<!-- Web Page for controlling an automated toaster
-- Note: Since we don't really have an automated toaster
-- mail the results back to the developer -->
<html>
<head>
<title>The Amazing Automated Toaster</title>
<script language="JavaScript">
<!-- script start
function setStatus(str)
{
window.status = str;
return true;
}
var greeting="Hello! How about some nice toasted bread products!";
window.defaultStatus = greeting;
// script end -->
</script>
</head>
<body>
<h1>The Amazing Automated Toaster</h1>
<form action="mailto:your_mail_ID" method="post">
<font size=5>Bread Product:</font>
<select name="product"
onFocus="setStatus('Select desired bread product from list.')"
onBlur="setStatus('')">
<option>Bread
<option>Waffle
<option>Bagel
<option>Roll
<option>Muffin
<option>Croissant
<option>Scone
</select>
<br>
<font size=5>Quantity:</font>
<input type="text" name="quantity" value="1" size=4 maxlength=4
onFocus="setStatus('Enter quantity of bread products desired (1-1000).')"
onBlur="setStatus('')">
<br>
<font size=5>Toastiness:</font>
<input type="text" name="toastiness" value="50" size=3 maxlength=3
onFocus="setStatus('Enter degree of toastiness from 0-100 (0=untoasted 100=burnt).')"
onBlur="setStatus('')">
<br>
<font size=5>Buttered:</font>
<font size=5>Yes</font>
<input type="radio" name="buttered" value="yes" checked
onClick="setStatus('Do you want butter on the bread product?')">
<font size=5>No</font>
<input type="radio" name="buttered" value="no"
onClick="setStatus('Do you want butter on the bread product?')">
<hr>
<input type="submit" value="Start Toaster">
<input type="reset">
</form>
</body>
</html>
|