Web - checking in some temp files. Nothing useful here.

This commit is contained in:
adelikat 2009-11-27 15:53:16 +00:00
parent 19b91b03e0
commit 7eada81ac8
11 changed files with 746 additions and 0 deletions

View File

@ -0,0 +1,91 @@
<html>
<head>
<title>About Me</title>
</head>
<body>
<form method="post">
<input type="Button" name="" value="Home"
onClick="window.location.pathname = 'home.html'">
<input type="Button" name="" value="Career"
onClick="window.location.pathname = 'career.html'">
<input type="Button" name="" value="About Me"
onClick="window.location.pathname = 'aboutme.html'">
<input type="Button" name="" value="Browser"
onClick="window.location.pathname = 'browser.html'">
</form>
<br><br>
<a href="aboutme.html#My info"
onMouseOver="window.status='See basic information about me';
return true"
onMouseOut="window.status=' '; return true">
My info</a>
<a href="aboutme.html#Bio"
onMouseOver="window.status='See my bio';
return true"
onMouseOut="window.status=' '; return true">
Bio</a>
<h2><a name="My info"></a>My information</h2>
<script language= "javascript" type="text/javascript">
myName = "Andrés Delikat"
myNickname = "Andy"
myGender = "Male"
myBirthday = "01/28/1980"
</script>
<script language= "javascript" type="text/javascript">
document.write("<table border=\'1\'>")
document.write("<tr>")
document.write("<td>Name</td>")
document.write("<td>", myName, "</td>")
document.write("</tr>")
document.write("<tr>")
document.write("<td>Nickname</td>")
document.write("<td>", myNickname, "</td>")
document.write("</tr>")
document.write("<tr>")
document.write("<td>Gender</td>")
document.write("<td>", myGender, "</td>")
document.write("</tr>")
document.write("<tr>")
document.write("<td>Birthday</td>")
document.write("<td>", myBirthday, "</td>")
document.write("</tr>")
document.write("</table>")
</script>
<h2><a name="Bio"></a>Bio</h2>
<script language= "javascript" type="text/javascript">
document.write("I am a Lake City Community College Computer programming student.", "<br>")
</script>
<br><br>
<a href="aboutme.html#My info"
onMouseOver="window.status='See basic information about me';
return true"
onMouseOut="window.status=' '; return true">
My info</a>
<a href="aboutme.html#Bio"
onMouseOver="window.status='See my bio';
return true"
onMouseOut="window.status=' '; return true">
Bio</a>
</body>
</html>

View File

@ -0,0 +1,44 @@
<html>
<head>
<title>My Browser</title>
</head>
<body>
<form method="post">
<input type="Button" name="" value="Home"
onClick="window.location.pathname = 'home.html'">
<input type="Button" name="" value="Career"
onClick="window.location.pathname = 'career.html'">
<input type="Button" name="" value="About Me"
onClick="window.location.pathname = 'aboutme.html'">
<input type="Button" name="" value="Browser"
onClick="window.location.pathname = 'browser.html'">
</form>
<br><br>
<a href="browser.html#Browser"
onMouseOver="window.status='See browser information';
return true"
onMouseOut="window.status=' '; return true">
Browser</a>
<h2><a name="Browser"></a>My Browser</h2>
<script language="javascript" type="text/javascript">
document.write("appCodeName: ", navigator.appCodeName, '<br>')
document.write("appName: ", navigator.appName, "<br>")
document.write("platform: ", navigator.platform, "<br>")
document.write("userAgent: " , navigator.userAgent, "<br>")
document.write("Screen resolution: ", window.screen.width, " x ", window.screen.height, "<br>")
document.write("Window resolution: ", window.innerWidth, " x ", window.innerHeight, "<br>")
document.write("Location: ", window.location.protocol, window.location.host, window.location.pathname, "<br>")
</script>
<br><br>
<a href="browser.html#Browser"
onMouseOver="window.status='See browser information';
return true"
onMouseOut="window.status=' '; return true">
Browser</a>
</body>
</html>

View File

@ -0,0 +1,87 @@
<html>
<head>
<title>Career, Hobbies, School</title>
<script language= "javascript" type="text/javascript">
myTitle = "Piano instructor"
myJobDescription = "teaching private and group piano lessons."
myEmployer = "LCCC"
</script>
</head>
<body>
<form method="post">
<input type="Button" name="" value="Home"
onClick="window.location.pathname = 'home.html'">
<input type="Button" name="" value="Career"
onClick="window.location.pathname = 'career.html'">
<input type="Button" name="" value="About Me"
onClick="window.location.pathname = 'aboutme.html'">
<input type="Button" name="" value="Browser"
onClick="window.location.pathname = 'browser.html'">
</form>
<br><br>
<a href="career.html#Assignments"
onMouseOver="window.status='See my school assignments';
return true"
onMouseOut="window.status=' '; return true">
Assignments</a>
<a href="career.html#Hobbies"
onMouseOver="window.status='See my hobbies';
return true"
onMouseOut="window.status=' '; return true">
Hobbies</a>
<a href="career.html#Job"
onMouseOver="window.status='See my job information';
return true"
onMouseOut="window.status=' '; return true">
Job</a>
<h2><a name="Assignments"></a>My Assignments</h2>
Javascript assignments
Expression web tutorials
<h2><a name="Hobbies"></a>My Hobbies</h2>
<script language="javascript" type="text/javascript">
document.write("<ol>")
document.write("<li>Playing Guitar</li>")
document.write("<li>Listening to Music</li>")
document.write("<li>Watching Movies</li>")
document.write("<li>Video Games</li>")
document.write("<li>Video Game Emulators</li>")
document.write("</ol>")
</script>
<h2><a name="Job"></a>"My Job</h2>
<script language="javascript" type="text/javascript">
document.write("I'm a ", myTitle, " at ", myEmployer, ".", "<br>", "My duties include ", myJobDescription)
</script>
<br><br>
<a href="career.html#Assignments"
onMouseOver="window.status='See my school assignments';
return true"
onMouseOut="window.status=' '; return true">
Assignments</a>
<a href="career.html#Hobbies"
onMouseOver="window.status='See my hobbies';
return true"
onMouseOut="window.status=' '; return true">
Hobbies</a>
<a href="career.html#Job"
onMouseOver="window.status='See my job information';
return true"
onMouseOut="window.status=' '; return true">
Job</a>
</body>
</html>

View File

@ -0,0 +1,119 @@
<!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">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Untitled 1</title>
</head>
<body>
<script language="javascript" type="text/javascript"><!--
//Andres Delikat
//Assignment 8
//Javascript Scripting exercises #1,2,3
var ans1 = prompt("Please enter a number: ", 0)
var ans2 = prompt("Please enter a number: ", 0)
var type1 = typeof(ans1)
var type2 = typeof(ans2)
document.write("You entered: ", ans1, " (", type1, ") ")
document.write(" and ", ans2, " (", type2, ") ", "<br>")
var num1 = parseFloat(ans1)
var num2 = parseFloat(ans2)
var booltest = num1 == num2
document.write(num1, " == ", num2, "? ", booltest, "<br>")
var booltest = num1 != num2
document.write(num1, " != ", num2, "? ", booltest, "<br>")
var booltest = num1 === num2
document.write(num1, " === ", num2, "? ", booltest, "<br>")
var booltest = num1 !== num2
document.write(num1, " !== ", num2, "? ", booltest, "<br>")
var booltest = num1 < num2
document.write(num1, " < ", num2, "? ", booltest, "<br>")
var booltest = num1 <= num2
document.write(num1, " <= ", num2, "? ", booltest, "<br>")
var booltest = num1 > num2
document.write(num1, " > ", num2, "? ", booltest, "<br>")
var booltest = num1 >= num2
document.write(num1, " >= ", num2, "? ", booltest, "<br>")
var sum = num1 + num2
var difference = num1 - num2
var product = num1 * num2
var quotient = num1 / num2
var mod = num1 % num2
document.write("Sum: ", sum, "<br>")
document.write("Difference: ", difference, "<br>")
document.write("Product: ", product, "<br>")
document.write("Modulus: ", mod, "<br>")
//Andres Delikat
//Assignment 8
//Javascript Scripting exercises #4
var ans1 = prompt("Please enter a number: ", 0)
var ans2 = prompt("Please enter a second number: ", 0)
var ans3 = prompt("PLease enter a third nubmer: ", 0)
var num1 = parseFloat(ans1)
var num2 = parseFloat(ans2)
var num3 = parseFloat(ans3)
var average = (num1 + num2 + num3) / 3
document.write("You gave 3 answers: ", num1, ", ", num2, ", and ", num3, "<br>")
document.write("Their average is ", average, "<br>")
//Andres Delikat
//Assignment 8
//Javascript Scripting exercises #5
var hours = prompt("Enter the number of hours you worked this week: ", 0)
var rate = prompt("Enter your hourly rate: ", 0)
var hours = parseFloat(hours)
var rate = parseFloat(rate)
var overtimeRate = rate * 1.5
var overtimeHours = hours - 40
var regularPay //First 40 hours times hourly rate
var overtimePay //Overtime hours times time and a half
var totalPay //Total pay
if (hours > 40) //If over 40 hours, figure out overtime hours
{
overtimeHours = hours - 40
hours = 40
}
else //Else no overtime hours
{
overtimeHours = 0
}
//Calculate pay
regularPay = hours * rate
overtimePay = overtimeHours * overtimeRate
totalPay = regularPay + overtimePay
//Display calculations to the user
document.write("Total Hours Worked: ", hours, "<br>")
document.write("Regular Pay: ", hours, " hours @ $", rate, "/hour = $", regularPay, "<br>")
document.write("Overtime Pay: ", overtimeHours, " hours @ $", overtimeRate, "/hour = $", overtimePay, "<br>")
document.write("Total Pay: $", totalPay, "<br>")
//-->
</script>
</body>
</html>

View File

@ -0,0 +1,48 @@
<!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">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Untitled 1</title>
</head>
<body>
<script language="javascript" type="text/javascript"><!--
//Andres Delikat
//Assignment 8
//Javascript Scripting exercises #6
//Get a dolloar amount
var amount = parseFloat(prompt("Enter a dollar amount: "))
if (isNaN(amount)) //In case the user types something invalid, go with 0
{
amount = 0
}
//Exchange rates according to google on 10/14/2009
var GBPe = 1.5998 //British pounds
var HKDe = 0.129032 //Hong Kong Dollar
var MXNe = 0.076508 //Mexican Pesos
//Calculate amounts in each currency
var GBP = amount / GBPe
var HKD = amount / HKDe
var MXN = amount / MXNe
//Format the currency to 2 decimal places
GBP = GBP.toFixed(2)
HKD = HKD.toFixed(2)
MXN = MXN.toFixed(2)
//Display results to the user
document.write("$", amount, " in U.S. Currency is equivalent to: <br>")
document.write(GBP, " GBP (British Pounds) <br>")
document.write(HKD, " HKD (Hong Kong Dollars) <br>")
document.write(MXN, " MXN (Mexican Pesos) <br>")
//-->
</script>
</body>
</html>

113
new/Javascript/home.html Normal file
View File

@ -0,0 +1,113 @@
<html>
<head>
<title>Andres Delikat</title>
<script language= "javascript" type="text/javascript">
myName = "Andrés Delikat"
myEmail = "andres.delikat@gmail.com"
myPhone = "(352) 275-2854"
myWebsite = "http://tasvideos.org"
myBooks = new Array("Chronicles of Narnia", "Lord of the Rings", "To Kill a Mockingbird", "A Tree Grows in Brooklyn", "The old man and the Sea", "The Odyssey", "The lliad")
authors = new Array("C.S. Lewis","J.R.R. Tolkien","Harper Lee","Betty Smith","Earnest Hemingway","Homer","Homer")
</script>
</head>
<body>
<h1>Andres Delikat&nbsp;
</h1>
<form method="post">
<input type="Button" name="" value="Home"
onClick="window.location.pathname = 'home.html'">
<input type="Button" name="" value="Career"
onClick="window.location.pathname = 'career.html'">
<input type="Button" name="" value="About Me"
onClick="window.location.pathname = 'aboutme.html'">
<input type="Button" name="" value="Browser"
onClick="window.location.pathname = 'browser.html'">
</form>
<br><br>
<a href="home.html#Picture"
onMouseOver="window.status='See a picture of me';
return true"
onMouseOut="window.status=' '; return true">
My info</a>
<a href="home.html#Books"
onMouseOver="window.status='See my favorite books';
return true"
onMouseOut="window.status=' '; return true">
Books</a>
<a href="home.html#Quote"
onMouseOver="window.status='See my favorite quote';
return true"
onMouseOut="window.status=' '; return true">
Bio</a>
<h2><a name="Picture"></a>My Picture</h2>
<img name="delikat" alt ="" src="http://dl.getdropbox.com/u/75355/HostedImages/bombcrag.png" height="34" width="33"></>
<br></>
<script language="javascript" type="text/javascript">
document.write("Img Src: ", window.document.delikat.src, "<br>")
document.write("Img Width: ", window.document.delikat.width, "<br>")
document.write("Img Height: ", window.document.delikat.height, "<br>")
</script>
<h2><a name="Books"></a>My favorite books</h2>
<script language="javascript" type="text/javascript">
//Display the array of books
for (var x = 0; x < myBooks.length; x++)
{
document.write(x+1, ". ", myBooks[x], " by ", authors[x], "<br>")
}
</script>
<p><b>Last Update:</b>
<script language="javascript" type="text/javascript">
if (document.lastModified == 0)
{
document.write("unknown")
}
else
{
document.write(document.lastModified)
}
</script>
</p>
<script language="javascript" type="text/javascript">
document.write("<h2><a name='Quote'</a>My Favorite Quote</h2>")
document.write("<blockquote>The only thing we have to fear is fear itself</blockquote>")
</script>
<script language="javascript" type="text/javascript">
document.write("This site maintained by: ", myName, "<br>")
document.write("Email: ", "<a href= \'", myEmail, "\'>", myEmail, "</a>","<br>")
document.write(" Phone: ", myPhone, "<br>")
document.write("<a href= \'", myWebsite, "\'>", myWebsite, "</a>")
</script>
<br><br>
<a href="home.html#Picture"
onMouseOver="window.status='See a picture of me';
return true"
onMouseOut="window.status=' '; return true">
My info</a>
<a href="home.html#Quote"
onMouseOver="window.status='See my favorite quote';
return true"
onMouseOut="window.status=' '; return true">
Bio</a>
<a href="home.html#Quote"
onMouseOver="window.status='See my favorite quote';
return true"
onMouseOut="window.status=' '; return true">
Bio</a>
</body>
</html>

48
new/Javascript/myLib.js Normal file
View File

@ -0,0 +1,48 @@
//Andres Delikat
//Javascript library for Javascript assignment 12
//Last update 10/18/2009
//Receives a number and returns its square
function calcSquare(num)
{
return num*num
}
//Receives a message to display to the user in a prompt
//then asks the user until they enter a valid number
//then returns the number
function getNum(message)
{
do
{
num = parseFloat(prompt(message))
} while (isNaN(num))
return num
}
//Receives 3 paramters: the image to swap, the image to swap it to, and a message to put in the status bar
//image1 and image2 should be image objects
//status should be a string
//No return value
function swapImg(image1, image2, status)
{
image1.src = image2.src //Swap 1 with 2
var message = "Replaced " + image1.name + " with " + image2.name
window.status = message
}
//Receives a variable number of paramters, and displays them as a numbered list
//No return value
function writeList()
{
if (arguments.length < 1)
{
return
}
for (var x = 0; x < arguments.length; x++)
{
document.write(x, ": ", arguments[x], "<br>")
}
}

View File

@ -0,0 +1,27 @@
<html>
<head>
<title>Number Play</title>
<!--
Andres Delikat
Web page programming assignment 12
Use my javascript library functions to ask the user for a number and display it and its square.
-->
<script type="text/javascript" src="myLib.js"></script>
</head>
<body>
<script language= "javascript" type="text/javascript">
var number = getNum("Please enter a number")
var result = calcSquare(number)
document.write("You entered: ", number, ".<br>")
document.write("The square of ", number, " is ", result, ".<br>")
</script>
</body>
</html>

View File

@ -0,0 +1,20 @@
<html>
<head>
<title>Password</title>
<!--
Andres Delikat
Web page programming assignment 13
Chapter 14 Scripting Exercise 3
-->
</head>
<body>
<script language= "javascript" type="text/javascript">
</script>
</body>
</html>

View File

@ -0,0 +1,69 @@
<html>
<head>
<title>Register</title>
<!--
Andres Delikat
Web page programming assignment 13
Chapter 14 Scripting Exercise 2
-->
<script language="JavaScript" src="cookieLib.js"
type="text/javascript">
</script>
<script language="Javascript" type="text/javascript">
function SubmitForm(Name,Password,Confirm)
{
if (Password == Confirm)
{
document.write("You have successfully registered!<br>")
document.write(Name,"<br>") //Debug
document.write(Password,"<br>") //Debug
document.write(Confirm,"<br>") //Debug
//Store info in cookie
}
else
{
document.write("Error, password fields to do not match<br>")
}
}
</script>
</head>
<!--<body onload="PopupRegistration()">-->
<body>
<h1>Greetings!</h1>
<h2>Please register</h2>
<form name="CustomerData"
action="mailto:js@javascriptconcepts.com" method="post">
<table border="0">
<tr>
<td>Name:</td>
<td><input type = "text" name = "username"></td>
</tr>
<tr>
<td>Password:</td>
<td><input type = "password" name = "password"></td>
</tr>
<tr>
<td>Confirm password:</td>
<td><input type = "password" name = "confirm"></td>
</tr>
<tr>
<td><input type = "button" value="Submit" onClick="SubmitForm(name.text,password.text,confirm.text)"></td>
</tr>
</table>
</form>
<script language= "javascript" type="text/javascript">
</script>
</body>
</html>

View File

@ -0,0 +1,80 @@
<html>
<head>
<title>Guess</title>
<style type="text/css">
.style1 {
text-align: center;
}
</style>
</head>
<body>
<h2 class="style1">Guessing Game</h2>
<h3 class="style1">Can you guess the number?</h3>
<h4 class="style1">How many tries will it take!</h4>
<script language= "javascript" type="text/javascript">
var range = 100 //The range of possible numbers the guessing game will use
var target = Math.floor(Math.random() * range + 1);
var count = 1 //Number of tries the user has taken
var guess = 0 //The users current guess
var win = false //Bool that will be true when the user makes the correct guess
var test = 0 //temp variable for determining how close the user got
var resultStr = "" //Use to create a message to the user when they guess correctly
var guesses = new Array() //Array used to store the user's guesses
//document.write("Debug: target = ", target, "<br>")
document.write("Number range: 0-", range, "<br><br>")
do
{
guess = prompt("Enter a guess between 1 and " + range)
guesses[count] = guess //Store the user's guess
if (guess == target)
{
//You win
win = true
if (count < 5)
{
resultStr = "You did an awesome job, it only took you " + count + " tries to guess the target number."
}
else if (count <= 15)
{
resultStr = "Goodness. It took you " + count + " tries to guess the target number."
}
else
{
resultStr = "Yikes! It took you " + count + " tries to guess the target number."
}
}
else
{
count++
test = guess - target
if (test < 3 && test > -3)
{
document.write(guess, ": You're Red Hot!<br>")
}
else if (test < 10 && test > -10)
{
document.write(guess, ": You're getting warm.<br>")
}
else if (test < 20 && test > -20)
{
document.write(guess, ": You're getting cold!<br>")
}
else
{
document.write(guess, ": You're Ice Cold!<br>")
}
}
} while (!win)
alert("Success!\n" + resultStr)
document.write("Your ", guesses.length, " guesses: ", guesses, "<br>")
</script>
</body>
</html>