//=============script info for those with old browsers==============//
//======================don't copy these lines======================//
//==============================script==============================//
if (document.images) {
img1off = new Image();img1off.src = "/images/first1.gif";
img2off = new Image();img2off.src = "/images/back1.gif";
img3off = new Image();img3off.src = "/images/next1.gif";
img4off = new Image();img4off.src = "/images/today1.gif";
}
function imageLoad() {
if (document.images) {
img1on = new Image();img1on.src = "/images/first2.gif";
img2on = new Image();img2on.src = "/images/back2.gif";
img3on = new Image();img3on.src = "/images/next2.gif";
img4on = new Image();img4on.src = "/images/today2.gif";
return (loaded = true);
}
}
function rollOut(imgName) {
if (document.images) {
document[imgName].src = eval(imgName+"off.src");
}
}
function rollIn(imgName) {
if (document.images && (loaded == true)) {
document[imgName].src = eval(imgName+"on.src");
}
}
function getFirst() {
var firstHTML;
if (fstDay == '') {
firstHTML='';
}
else {
firstHTML='';
}
return firstHTML;
}
function getPrevious() {
var previousHTML;
if (prvDay == '') {
previousHTML='';
}
else {
previousHTML='';
}
return previousHTML;
}
function getNext() {
var nextHTML;
if (nxtDay.slice(12,16) == 'Next') {
nextHTML='';
}
else {
nextHTML='';
}
return nextHTML;
}
function getToday() {
var todayHTML;
todayHTML='';
return todayHTML;
}
//============================end script============================//
I've tweaked Todd's script so it runs from a *.js file to save on bandwidth and load times [they won't be downloading the script again and again as they go through your archives].
It was a straight search-and-replace so there shouldn't be any problems. If there are though, Hlet me know ( http://forums.keenspace.com/viewforum.php?f=196 ). - Seven^3
Yeah, it looks intimidating at first glance. If you're still interested, let's see if I can simplify it:
1: Either copy and paste everything into a text file and save it as rollovers.js, or just download http://gear.keenspace.com/scripts/rollovers.js.
Upload the script into your images folder.
2: Copy and paste all of this (everything between -and including- ) somewhere between your and HTML tags.
3: Inside the first tag, insert:
onLoad="imageLoad();"
4: In your images folder, put:
(Don't forget to delete or rename your XXXX_day buttons if you've got them)
("off" buttons) first1.gif, back1.gif, next1.gif, today1.gif
("on" buttons) first2.gif, back2.gif, next2.gif, today2.gif
(faded/disabled buttons) nofirst.gif, noback.gif
5: Insert the following code wherever you want your buttons to appear:
The two below are for your dailytemplate only.
Todd Micheals - Boarders and Sister ( http://boardersandsister.keenspace.com/ )