|
[x]
Posted via EE Mobile
|
||
Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
||
| 02/16/2009 at 08:22AM PST, ID: 24147092 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112: 113: 114: 115: 116: 117: 118: 119: 120: 121: 122: 123: 124: 125: 126: 127: 128: 129: 130: 131: 132: 133: 134: 135: 136: 137: 138: 139: 140: 141: 142: 143: 144: 145: 146: 147: 148: 149: 150: 151: 152: 153: 154: 155: 156: 157: 158: 159: 160: 161: 162: 163: 164: 165: 166: 167: 168: 169: 170: 171: 172: 173: 174: 175: 176: 177: 178: 179: 180: 181: 182: 183: 184: 185: 186: 187: 188: 189: |
first is the .htm code
<html>
<head>
<!--
New Perspectives on JavaScript
Tutorial 2
Review Assignment
Events in Dixon
Author: Maria
Date: February 11, 2009
Filename: events.htm
Supporting files: dates.js, dixon.css, logo.jpg
-->
<title>Upcoming Events at Dixon</title>
<link href="dixon.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="dates.js"></script>
<script type="text/javascript">
function showCountdown() {
//the today variable contains the current date and time
var today = new Date();
today = New Date("December 1, 2007 6:31:45");
Date1 = (January 14, 2007, 10:00:00");
Date2 = (May 21, 2007 12:00:00);
Date3 = (July 4, 2007 21:00:00);
Date4 = (September 1, 2007 12:00:00);
Date5 = (December 1, 2007 11:30:00);
Date6 = (December 31, 2007 15:30:00);
}
// I'm not sure if the rest of the script below is done correctly
show changeYear(date1);
show changeYear(date2);
show changeYear(date3);
show changeYear(date4);
show changeYear(date5);
show changeYear(date6);
</script>
</head>
<body onload='showCountdown()';> /*one of the steps after the requested questions */
<form name="eventform" id="eventform" action="">
<div id="links1">
<a href="#">Home</a>
<a href="#">City Services</a>
<a href="#">City Agencies</a>
<a href="#">Mayor's Office</a>
<a href="#">News Today</a>
<a href="#">Upcoming Events</a>
</div>
<div id="logo">
<img src="logo.jpg" alt="New Years Bash" />
</div>
<div id="links2">
<a href="#">Site Map</a>
<a href="#">Search Engine</a>
<a href="#">Public Notices</a>
<a href="#">Survey Form</a>
<a href="#">Contact Us</a>
<a href="#">E-Government</a>
</div>
<div id="main">
<h3>Countdown to Upcoming Events</h3>
<table>
<tr>
<td></td>
<th style="text-align: right">Current Time </th>
<td><input name="thisDay" id="thisDay" readonly="readonly" size="40" onLoad="javascript:showDateTime(today)" /></td>
</tr>
<tr>
<th>Event</th>
<th>Starting Time</th>
<th>Countdown to Event</th>
</tr>
<tr>
<td><input value="Heritage Day" readonly="readonly" size="20" /></td>
<td><input value="Jan 14 at 10:00 am"readonly="readonly" size="20" /></td>
<td><input name="count1" id="count1" size="40" /></td>
</tr>
<tr>
<td><input value="Spring Day Rally" readonly="readonly" size="20" /></td>
<td><input value="May 21 at 12:00 pm"readonly="readonly" size="20" /></td>
<td><input name="count2" id="count2" size="40" /></td>
</tr>
<tr>
<td><input value="July 4th Fireworks" readonly="readonly" size="20" /></td>
<td><input value="Jul 4 at 9:00 pm" readonly="readonly" size="20" /></td>
<td><input name="count3" id="count3" size="40" /></td>
</tr>
<tr>
<td><input value="Summer Bash" readonly="readonly" size="20" /></td>
<td><input value="Sep 1 at 12:00 pm" readonly="readonly" size="20" /></td>
<td><input name="count4" id="count4" size="40" /></td>
</tr><tr>
<td><input value="Holiday Party" readonly="readonly" size="20" /></td>
<td><input value="Dec 1 at 11:30 am" readonly="readonly" size="20" /></td>
<td><input name="count5" id="count5" size="40" /></td>
</tr>
<tr>
<td><input value="New Year's Bash" readonly="readonly" size="20" /></td>
<td><input value="Dec. 31 at 3:30 pm" readonly="readonly" size="20" /></td>
<td><input name="count6" id="count6" size="40" /></td>
</tr>
</table>
</div>
</form>
</body>
</html>
this is the ..js code
/*
New Perspectives on JavaScript
Tutorial 2
Review Assignment
Author: Maria
Date: February 11, 2009
Function List:
showDateTime(time)
Returns the date in a text string formatted as:
mm/dd/yyyy at hh:mm:ss am
changeYear(today, holiday)
Changes the year value of the holiday object to point to the
next year if it has already occurred in the present year
countdown(stop, start)
Displays the time between the stop and start date objects in the
text format:
dd days, hh hrs, mm mins, ss secs
*/
function showDateTime(time) {
date = time.getDate();
month = time.getMonth()+1;
year = time.getFullYear();
second = time.getSeconds();
minute = time.getMinutes();
hour = time.getHours();
ampm = (hour < 12) ? " am" : " pm";
hour = (hour > 12) ? hour - 12 : hour;
hour = (hour == 0) ? 12 : hour;
minute = minute < 10 ? "0"+minute : minute;
second = second < 10 ? "0"+second : second;
return month+"/"+date +"/"+year+" at "+hour+":"+minute+":"+second+ampm;
}
//creating function to changeYear with 2 parameters: today,holiday
function changeYear(today,holiday) {
//get full year to extract the 4 digit from today variable,store in variable named year
var year=today.getFullYear();
//use setFullYear()date method to set full year of holiday date object to value of year variable
var holiday = holiday.setFullYear(year);
year = (holiday < today) ? year+1 : year;
holiday=holiday.setFullYear(year);
}
function countdown(start,stop) {
// create a function called countdown that passes 2 parameters- start and stop.the start
//parameter contains a date object for the starting date, and the stop parameter contains
// a date object for the stopping date
//1st line calculate time difference between stop& start,storing in variable named time
time = (stop.getDate() - start.getDate());
//2nd, convert time difference into days, hours, minutes, seconds in a text string
var today=New Date("February 15, 2009 14:35:05");
var oneDay = 1000*60*60*24;//in case I need to divide time by this to get days returned
var days = today.getDay();
var hours = today.getHours();
var minutes = today.getMinutes();
var seconds = today.getSeconds();
return days + ":" + hours + ":" + minutes + ":" seconds;
}
|
Advertisement