The page code given is looking for the buttons in the same folder as
where the page is located. - if the page is in the root, then the
buttons must be in the root, if the buttons are in a folder, the page
must be in the same folder.
This page will work correctly.
BUT.
If the pages this page is included in are NOT in the same folder,
those pages will fail.
Take the code for one of the buttons:
<a href="index.htm">
<img border="0" id="img1" src="button1.jpg" height="30" width="150"
alt="Home"
onmouseover="FP_swapImg(1,0,/*id*/'img1',/*url*/'button2.jpg')"
onmouseout="FP_swapImg(0,0,/*id*/'img1',/*url*/'button1.jpg')"
onmousedown="FP_swapImg(1,0,/*id*/'img1',/*url*/'button3.jpg')"
onmouseup="FP_swapImg(0,0,/*id*/'img1',/*url*/'button2.jpg')"
fp-style="fp-btn: Glass Rectangle 5" fp-title="Home"></a>
If this page is moved into a folder (unlikely since this is the Home
page, but pretend...) the code in index.htm (when the include is done,
preview in browser and view source to see the code) will change to:
<a href="folder/index.htm">
<img border="0" id="img1" src="../button1.jpg" height="30"
width="150"
alt="Home"
onmouseover="FP_swapImg(1,0,/*id*/'img1',/*url*/'button2.jpg')"
onmouseout="FP_swapImg(0,0,/*id*/'img1',/*url*/'button1.jpg')"
onmousedown="FP_swapImg(1,0,/*id*/'img1',/*url*/'button3.jpg')"
onmouseup="FP_swapImg(0,0,/*id*/'img1',/*url*/'button2.jpg')"
fp-style="fp-btn: Glass Rectangle 5" fp-title="Home"></a>
Notice that the path to the original button image changes to
.../button1.jpg, but the paths in the event handlers do not change.
example
onmouseover="FP_swapImg(1,0,/*id*/'img1',/*url*/'button2.jpg')"
stays exactly the same. In other words, the path to the button is
broken and the button will disappear, replaced by the missing image
symbol.
To use an include file containing Interactive Buttons the include file
MUST be in the same folder as the pages it is included in. The
buttons themselves can be located elsewhere, provided all the paths to
the buttons in the include file are correct.
This is not related to your buttons problem, but you should remove
spaces from file and folder names. Spaces break links in some
browsers.
--
Ron Symonds - Microsoft MVP (FrontPage)
Reply only to group - emails will be deleted unread.
FrontPage Support:
http://www.frontpagemvps.com/
I thought maybe the entire code would help so here it is:
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<title>Left Side Navigation Bar</title>
<script language="JavaScript">
<!--
function FP_preloadImgs() {
var d=document,a=arguments; if(!d.FP_imgs) d.FP_imgs=new Array();
for(var i=0; i<a.length; i++) { d.FP_imgs
=new Image;
d.FP_imgs.src=a; }
}
function FP_swapImg() {//v1.0
var doc=document,args=arguments,elm,n; doc.$imgSwaps=new Array();
for(n=2; n<args.length;
n+=2) { elm=FP_getObjectByID(args[n]); if(elm) {
doc.$imgSwaps[doc.$imgSwaps.length]=elm;
elm.$src=elm.src; elm.src=args[n+1]; } }
}
function FP_getObjectByID(id,o) {//v1.0
var c,el,els,f,m,n; if(!o)o=document; if(o.getElementById)
el=o.getElementById(id);
else if(o.layers) c=o.layers; else if(o.all) el=o.all[id]; if(el)
return el;
if(o.id==id || o.name==id) return o; if(o.childNodes)
c=o.childNodes;
if(c)
for(n=0; n<c.length; n++) { el=FP_getObjectByID(id,c[n]); if(el)
return el; }
f=o.forms; if(f) for(n=0; n<f.length; n++) { els=f[n].elements;
for(m=0; m<els.length; m++){ el=FP_getObjectByID(id,els[n]); if(el)
return el; } }
return null;
}
// -->
</script>
</head>
<body
onload="FP_preloadImgs(/*url*/'ButtonsandPictures/button19.jpg',
/*url*/'ButtonsandPictures/button9.jpg', /*url*/'button2.jpg',
/*url*/'button3.jpg', /*url*/'button5.jpg', /*url*/'button6.jpg',
/*url*/'button8.jpg', /*url*/'button9.jpg', /*url*/'buttonB.jpg',
/*url*/'buttonC.jpg', /*url*/'buttonE.jpg', /*url*/'buttonF.jpg',
/*url*/'button11.jpg', /*url*/'button12.jpg', /*url*/'button14.jpg',
/*url*/'button15.jpg', /*url*/'button17.jpg',
/*url*/'button18.jpg')">
<p>
<img border="0" src="ButtonsandPictures/EGSLogoLine1.gif"
width="862"
height="117"></p>
<div style="position: absolute; width: 151px; height: 31px; z-index:
3;
left: 11px; top: 135px" id="layer6">
<a href="index.htm">
<img border="0" id="img1" src="button1.jpg" height="30" width="150"
alt="Home"
onmouseover="FP_swapImg(1,0,/*id*/'img1',/*url*/'button2.jpg')"
onmouseout="FP_swapImg(0,0,/*id*/'img1',/*url*/'button1.jpg')"
onmousedown="FP_swapImg(1,0,/*id*/'img1',/*url*/'button3.jpg')"
onmouseup="FP_swapImg(0,0,/*id*/'img1',/*url*/'button2.jpg')"
fp-style="fp-btn: Glass Rectangle 5" fp-title="Home"></a></div>
<p> </p>
<div style="position: absolute; width: 148px; height: 30px; z-index:
4;
left: 11px; top: 178px" id="layer7">
<a href="Company%20Policies/companypolicies.htm">
<img border="0" id="img2" src="button4.jpg" height="30" width="150"
alt="Company Policies"
onmouseover="FP_swapImg(1,0,/*id*/'img2',/*url*/'button5.jpg')"
onmouseout="FP_swapImg(0,0,/*id*/'img2',/*url*/'button4.jpg')"
onmousedown="FP_swapImg(1,0,/*id*/'img2',/*url*/'button6.jpg')"
onmouseup="FP_swapImg(0,0,/*id*/'img2',/*url*/'button5.jpg')"
fp-style="fp-btn: Glass Rectangle 5" fp-title="Company
Policies"></a></div>
<div style="position: absolute; width: 151px; height: 32px; z-index:
5;
left: 10px; top: 263px" id="layer8">
<a href="Directions/directions.htm">
<img border="0" id="img3" src="buttonA.jpg" height="30" width="150"
alt="Directions"
onmouseover="FP_swapImg(1,0,/*id*/'img3',/*url*/'buttonB.jpg')"
onmouseout="FP_swapImg(0,0,/*id*/'img3',/*url*/'buttonA.jpg')"
onmousedown="FP_swapImg(1,0,/*id*/'img3',/*url*/'buttonC.jpg')"
onmouseup="FP_swapImg(0,0,/*id*/'img3',/*url*/'buttonB.jpg')"
fp-style="fp-btn: Glass Rectangle 5"
fp-title="Directions"></a></div>
<div style="position: absolute; width: 100px; height: 29px; z-index:
6;
left: 11px; top: 221px" id="layer9">
<a href="Departments/Departments.htm">
<img border="0" id="img4" src="button7.jpg" height="30" width="150"
alt="Departments"
onmouseover="FP_swapImg(1,0,/*id*/'img4',/*url*/'button8.jpg')"
onmouseout="FP_swapImg(0,0,/*id*/'img4',/*url*/'button7.jpg')"
onmousedown="FP_swapImg(1,0,/*id*/'img4',/*url*/'button9.jpg')"
onmouseup="FP_swapImg(0,0,/*id*/'img4',/*url*/'button8.jpg')"
fp-style="fp-btn: Glass Rectangle 5"
fp-title="Departments"></a></div>
<p> </p>
<div style="position: absolute; width: 149px; height: 31px; z-index:
7;
left: 11px; top: 307px" id="layer10">
<a href="E-Stationairy/estationary.htm">
<img border="0" id="img5" src="buttonD.jpg" height="30" width="150"
alt="E-Stationary"
onmouseover="FP_swapImg(1,0,/*id*/'img5',/*url*/'buttonE.jpg')"
onmouseout="FP_swapImg(0,0,/*id*/'img5',/*url*/'buttonD.jpg')"
onmousedown="FP_swapImg(1,0,/*id*/'img5',/*url*/'buttonF.jpg')"
onmouseup="FP_swapImg(0,0,/*id*/'img5',/*url*/'buttonE.jpg')"
fp-style="fp-btn: Glass Rectangle 5"
fp-title="E-Stationary"></a></div>
<div style="position: absolute; width: 151px; height: 31px; z-index:
8;
left: 11px; top: 350px" id="layer11">
<a href="Help%20Desk/helpdesk.htm">
<img border="0" id="img6" src="button10.jpg" height="30" width="150"
alt="Help Desk"
onmouseover="FP_swapImg(1,0,/*id*/'img6',/*url*/'button11.jpg')"
onmouseout="FP_swapImg(0,0,/*id*/'img6',/*url*/'button10.jpg')"
onmousedown="FP_swapImg(1,0,/*id*/'img6',/*url*/'button12.jpg')"
onmouseup="FP_swapImg(0,0,/*id*/'img6',/*url*/'button11.jpg')"
fp-style="fp-btn: Glass Rectangle 5" fp-title="Help Desk"></a></div>
<div style="position: absolute; width: 100px; height: 30px; z-index:
9;
left: 10px; top: 394px" id="layer12">
<a href="http://login.postini.com/exec/login">
<img border="0" id="img7" src="button13.jpg" height="30" width="150"
alt="Postini"
onmouseover="FP_swapImg(1,0,/*id*/'img7',/*url*/'button14.jpg')"
onmouseout="FP_swapImg(0,0,/*id*/'img7',/*url*/'button13.jpg')"
onmousedown="FP_swapImg(1,0,/*id*/'img7',/*url*/'button15.jpg')"
onmouseup="FP_swapImg(0,0,/*id*/'img7',/*url*/'button14.jpg')"
fp-style="fp-btn: Glass Rectangle 5" fp-title="Postini"></a></div>
<div style="position: absolute; width: 151px; height: 30px; z-index:
10; left: 10px; top: 436px" id="layer13">
<a href="Rosemont%20Site%20Info/RosemontIllinoisSiteInfo.htm">
<img border="0" id="img8" src="button16.jpg" height="30" width="150"
alt="Rosemont Information"
onmouseover="FP_swapImg(1,0,/*id*/'img8',/*url*/'button17.jpg')"
onmouseout="FP_swapImg(0,0,/*id*/'img8',/*url*/'button16.jpg')"
onmousedown="FP_swapImg(1,0,/*id*/'img8',/*url*/'button18.jpg')"
onmouseup="FP_swapImg(0,0,/*id*/'img8',/*url*/'button17.jpg')"
fp-style="fp-btn: Glass Rectangle 5" fp-title="Rosemont
Information"></a></div>
</body>
</html>
I JUST CAN'T SEEM TO FIGURE THIS OUT AND THOUGHT SOMEONE ELSE COULD