View difference between Paste ID: 3AXiQjF4 and 42m8FAZH
SHOW: | | - or go back to the newest paste.
1-
/*
1+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
4
<head>
5
<!--
6-
Date: 6/16/2011
6+
7-
Filename: flibrary.js
7+
8-
Functions List:
8+
9-
getStyle(object, styleName)
9+
Badger Aviation
10-
Returns the computed style value for a specified styleName applied to
10+
11-
an object.
11+
Date: June 16, 2011
12-
addEvent(object, evName, fnName, cap)
12+
Filename: badger.htm
13-
Assigns an event handers to object where evName is the name of the event,
13+
Supporting files: back.jpg, bar.jpg, corner.jpg, functions.js
14-
fnName is the name of the function, and cap is the capture phase.
14+
image0.jpg-image9.jpg, links.jpg, logo.jpg, styles.css
15-
This function works for both the IE and W3C event models.
15+
-->
16-
removeEvent(object, evName, fnName, cap)
16+
<title>Badger Aviation</title>
17-
Removes an event handers from object where evName is the name of the event,
17+
<link href="styles.css" rel="stylesheet" type="text/css" />
18-
fnName is the name of the function, and cap is the capture phase.
18+
<script type="text/javascript" src ="flibrary.js" ></script>
19-
This function works for both the IE and W3C event models.
19+
<script type="text/javascript" src ="slideshow.js" ></script>
20-
*/
20+
</head>
21-
function getStyle(object, styleName) {
21+
<body>
22-
if (window.getComputedStyle) {
22+
<div id="logo"><img src="logo.jpg" alt="Badger Aviation" /></div>
23-
return document.defaultView.getComputedStyle(object, null).getPropertyValue(styleName);
23+
<div id="corner"><img src="corner.jpg" alt="" /></div>
24-
} else if (object.currentStyle) {
24+
<div id="links"><img src="links.jpg" alt="" /></div>
25-
return object.currentStyle[styleName]
25+
<div id="title"><h1>Flight Photos</h1></div>
26-
}
26+
<div id="photos"><img id="photo" name="photo" src="image0.jpg" alt="" /></div>
27-
}
27+
<div id="bar">
28-
/*
28+
<div id="button">&nbsp;</div>
29-
Assigns an event handers to object where evName is the name of the event,
29+
</div>
30-
fnName is the name of the function, and cap is the capture phase.
30+
<div id="message">
31-
This function works for both the IE and W3C event models.
31+
See photos from one of our popular Dane County tours. Scroll through
32-
*/
32+
the slide show using your mouse or the Right and Left arrows on your keyboard. <br />
33-
function addEvent(object, evName, fnName, cap)
33+
<a href="../../index.html">Return to JavaScript Home Page</a> <br />
34-
{
34+
<p id="footer">
35-
if (object.attachEvent)
35+
This JavaScript powered technique can be easily adapted for use on slide shows on your own web page! <br />
36-
{
36+
This page is a simulation and was a course requirement for CPT 206, JavaScript and AJAX, at Westmoreland County Community College. <br />
37-
object.attachEvent("on" + evName, fnName);
37+
Web Designer: Kenneth Hitchcock <a href="mailto://ken@hitchcockk.com">email</a> Updated
38-
}
38+
<script type="text/javascript">
39-
else if (object.addEventListener)
39+
var today = new Date();
40-
{
40+
document.write(today);
41-
object.addEventListener(evName, fnName, cap);
41+
</script>
42-
}
42+
<!-- START OF HIT COUNTER CODE -->
43-
}
43+
<br><script language="JavaScript" src="http://www.counter160.com/js.js?img=6"></script><br><a href="http://www.000webhost.com"><img src="http://www.counter160.com/images/6/left.png" alt="Free web hosting" border="0" align="texttop"></a><a href="http://www.hosting24.com"><img alt="Web hosting" src="http://www.counter160.com/images/6/right.png" border="0" align="texttop"></a>
44-
/*
44+
<!-- END OF HIT COUNTER CODE -->
45-
Removes an event handers from object where evName is the name of the event,
45+
</p>
46-
fnName is the name of the function, and cap is the capture phase.
46+
</div>
47-
This function works for both the IE and W3C event models.
47+
</body>
48-
*/
48+
</html>
49-
function removeEvent(object, evName, fnName, cap)
49+
<!-- www.000webhost.com Analytics Code -->
50-
{
50+
<script type="text/javascript" src="http://stats.hosting24.com/count.php"></script>
51-
if (object.detachEvent)
51+
<noscript><a href="http://www.hosting24.com/"><img src="http://stats.hosting24.com/count.php" alt="web hosting" /></a></noscript>
52-
{
52+
<!-- End Of Analytics Code -->