Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: Re: Javascript and tables
From: Stumpy
Date: Tue, 30 Jun 1998 21:10:38 +0100

Thanks for the script.
It's the one from Project Cool:

<script language="Javascript">
<!-- Hide from old browsers
// NOTE: New Browser detection code, more effecient and allows Netscape 4.0
// And the new IE 4.0 which now supports image arrays.
//
//
// Copyright 1996-97 Project Cool, Inc. Used by the net, with permission.
// http://www.projectcool.com
//


browser = (((navigator.appName == "Netscape") &&
(parseInt(navigator.appVersion) >= 3 )) || ((navigator.appName ==
"Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 )))

if ( browser) {
normal = new MakeArray(11)
over = new MakeArray(11)
picture = new MakeArray(12)
blurb = new MakeArray(12)

normal[1].src = "rollover/music.gif"
normal[2].src = "rollover/shows.gif"
normal[3].src = "rollover/merch.gif"
normal[4].src = "rollover/guestbook.gif"
normal[5].src = "rollover/fan_club.gif"
normal[6].src = "rollover/history.gif"
normal[7].src = "rollover/gallery.gif"
normal[8].src = "rollover/road.gif"
normal[9].src = "rollover/links.gif"
normal[10].src = "rollover/contact.gif"

over[1].src = "rollover/music_over.gif"
over[2].src = "rollover/shows_over.gif"
over[3].src = "rollover/merch_over.gif"
over[4].src = "rollover/guestbook_over.gif"
over[5].src = "rollover/fan_club_over.gif"
over[6].src = "rollover/history_over.gif"
over[7].src = "rollover/gallery_over.gif"
over[8].src = "rollover/road_over.gif"
over[9].src = "rollover/links_over.gif"
over[10].src = "rollover/contact_over.gif"

picture[1].src = "rollover/music_pic.gif"
picture[2].src = "rollover/shows_pic.jpg"
picture[3].src = "rollover/merch_pic.gif"
picture[4].src = "rollover/guestbook_pic.gif"
picture[5].src = "rollover/fan_club_pic.gif"
picture[6].src = "rollover/history_pic.gif"
picture[7].src = "rollover/gallery_pic.gif"
picture[8].src = "rollover/road_pic.gif"
picture[9].src = "rollover/links_pic.gif"
picture[10].src = "rollover/contact_pic.gif"
picture[11].src = "rollover/normal_pic.gif"

blurb[1] = "Click for: The Music"
blurb[2] = "Click for: Show Information"
blurb[3] = "Click for: Merchandise Information"
blurb[4] = "Click to: Sign the Guestbook"
blurb[5] = "Click for: Fan Club Information"
blurb[6] = "Click for: Our History"
blurb[7] = "Click for: Photo Gallery"
blurb[8] = "Click for: Stories From the Road"
blurb[9] = "Click for: Links"
blurb[10] = "Click to: Contact Us"
blurb[11] = ""

}

function MakeArray(n) {
this.length = n
for (var i = 1; i<=n; i++) {
this[i] = new Image()
}
return this
}

function msover(num) {
if ( browser) {
document.images[num].src = over[num-2].src

document.images[0].src = picture[num-2].src
window.status = blurb[num-2]
}
}

function msout(num) {
if ( browser) {
document.images[num].src = normal[num-2].src

document.images[0].src = picture[11].src
window.status = blurb[11]
}
}
// Stop hiding from old browsers -->


</script>

<body blah, blah .....

<a href="music/index.html" onmouseover="msover(3) ; return true"
onmouseout="msout(3)"><img src="rollover/music.gif" width=144 height=20
border=0></a>
<br>
<a href="shows/index.html" onmouseover="msover(4) ; return true"
onmouseout="msout(4)"><img src="rollover/shows.gif" width=144 height=20
border=0></a>
<br>
<a href="merchandise/index.html" onmouseover="msover(5) ; return
true" onmouseout="msout(5)"><img src="rollover/merch.gif" width=144
height=20 border=0></a>
<br>
<a href="guestbook/index.html" onmouseover="msover(6) ; return
true" onmouseout="msout(6)"><img src="rollover/guestbook.gif" width=144
height=25 border=0></a>
<br>
<a href="fan_club/index.html" onmouseover="msover(7) ; return true"
onmouseout="msout(7)"><img src="rollover/fan_club.gif" width=144 height=23
border=0></a>
<br>
<a href="history/index.html" onmouseover="msover(8) ; return true"
onmouseout="msout(8)"><img src="rollover/history.gif" width=144 height=23
border=0></a>
<br>
<a href="gallery/index.html" onmouseover="msover(9) ; return true"
onmouseout="msout(9)"><img src="rollover/gallery.gif" width=144 height=24
border=0></a>
<br>
<a href="road/index.html" onmouseover="msover(10) ; return true"
onmouseout="msout(10)"><img src="rollover/road.gif" width=144 height=25
border=0></a>
<br>
<a href="links/index.html" onmouseover="msover(11) ; return true"
onmouseout="msout(11)"><img src="rollover/links.gif" width=144 height=22
border=0></a>
<br>
<a href="contact/index.html" onmouseover="msover(12) ; return true"
onmouseout="msout(12)"><img src="rollover/contact.gif" width=144 height=23
border=0></a>
</td>
<td align="LEFT">
<img src="graphics/main_pic.jpg" width=345 height=216 border=0
alt="Lowen and Navarro">


Stumpy
Internet Designs
stumpyatepochworks [dot] com

------------------------------------------------------------------------
To UNSUBSCRIBE send: unsubscribe flasher in the body of an
email to list-manageratshocker [dot] com. Problems to: owneratshocker [dot] com
N.B. Email address must be the same as the one you used to subscribe.
For info on digest mode send: info flasher to list-manageratshocker [dot] com


[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]