Dreamweaver Library Question

Hey all,
I have a button bar in Dreamweaver that is from a Library in Dreamweaver. So whatever I do to that library item will be done in the pages it is linked to.

Now I want to have a change in the buttons. I want each page that the button goes to to become “dead” if you will. So if the page is on “Home” I want the “home button” to be red and the rest white…ect…
Can I do that with a library item or will I have to just use a none library item?

Thanks

These are the pages.

You could use individually named body tags on the pages and combine that name with the corresponding named items in the library nav list.

Look at Option #2 in this example for an idea how to do it.

Took a brief look at your link;

You actually have three body tags in your code together with doubled source code!

You need to take a closer look in your DW libraries I think. Probably the doubled blocks is present in more than one place.

Wow! Thanks! I see the three body tags. How can I possibly clean that up?
Also, what do you mean by "double blocks?: I do have two things going on in a library… two strips of buttons. Is that what you mean?
Thanks

:injured:

I meant there was some code iterated in the source. Like the functions in the code below. Maybe you have the same code in more than one library? E.g. where the nested library calls are. (That block of functions is also in the head by the way.)

<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>XXXX</title>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<script type="text/javascript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
    <link href="cssfiles/styleone.css" rel="stylesheet" type="text/css" />
</head>
<script id="gwScript" type="text/javascript">
function gwCall(method, argStr)
{
var gwProxy = window.document.getElementById('gwProxy');
if (gwProxy)
{
gwProxy.setAttribute('gwMethod', method);
gwProxy.setAttribute('gwArgStr', argStr);
var e = document.createEvent('MouseEvents');
e.initEvent('click',true,true);
gwProxy.dispatchEvent(e);
}
}
function jsCall()
{
var jsProxy = document.getElementById('jsProxy');
if (jsProxy)
{
var jsCode = jsProxy.getAttribute('jsCode');
eval(jsCode);
}
}
function Gateway()
{
var _P4r4m5_ = {};
this.addParam = function(name,value)
{
_P4r4m5_[escape(name)] = escape(value);
}
this.callName = function(callName)
{
var paramStr = '';
for (name in _P4r4m5_)
{
paramStr = paramStr+
((paramStr == '') ? '' : '&')+
name+'='+_P4r4m5_[name];
}
gwCall(callName, paramStr);
}
}
function showIFrame(name, url)
{
frames[name].location.href = url;
}
function createSrcScriptElement(srcPath)
{
var js = document.createElement('script');
js.setAttribute('type', 'text/javascript');
js.setAttribute('src', srcPath);
document.getElementsByTagName('head')[0].appendChild(js);
}
function createInlineScriptElement(escapedJsCode)
{
try{
var js;
if(document.standardCreateElement)
js = document.standardCreateElement('script');
else
js = document.createElement('script');
js.setAttribute('type', 'text/javascript');
js.text = unescape(escapedJsCode);
document.getElementsByTagName('head')[0].appendChild(js);
}
catch(e){
//alert(document.createElement);
//alert('ERROR: createInlineScriptElement(): '+e);
}
}
function invokeInGuiThread(callName, argPtr)
{
var gwObj = new Gateway();
gwObj.addParam('argPtr',argPtr);
gwObj.callName(callName);
}
</script>
<body class="body" onload="MM_preloadImages('images/buttons_over/home_over.gif','images/buttons_over/bootcamp_over.gif','images/buttons_over/dailydozen_over.gif','images/buttons_over/events_over.gif','images/buttons_over/programs_over.gif','images/buttons_over/about_over.gif','images/buttons_over/directions_over.gif','images/buttons_over/facility_over.gif','images/buttons_over/testimonials_over.gif','images/buttons_over/contact_over.gif')">
<center>
<!-- #BeginLibraryItem "/Library/Banner.lbi" -->
<table border="0" cellpadding="0" cellspacing="0">
    <tr>
        <td align="center" valign="top"><img src="images/mr.billfitnessbanner.gif" alt="Mr.Bill Fitness Banner" width="970" height="167"></td>
    </tr>
</table>
<!-- #EndLibraryItem -->
<span class="stylesheetone"></span>
<!-- #BeginLibraryItem "/Library/Button MenuUpper.lbi" -->
<script type="text/javascript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<center>
<body onLoad="MM_preloadImages('../images/buttons_over/home_over.gif','../images/buttons_over/bootcamp_over.gif','../images/buttons_over/dailydozen_over.gif','../images/buttons_over/events_over.gif','../images/buttons_over/programs_over.gif','../images/buttons_over/about_over.gif','../images/buttons_over/directions_over.gif','../images/buttons_over/facility_over.gif','../images/buttons_over/testimonials_over.gif','../images/buttons_over/contact_over.gif')">
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
    <tr>
        <td align="center" valign="top">
<!-- #BeginLibraryItem "/Library/Button Strip.lbi" -->
<script type="text/javascript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
        <body onLoad="MM_preloadImages('../images/buttons_over/facility_over.gif','../images/buttons_over/bootcamp_over.gif','../images/buttons_over/events_over.gif','../images/buttons_over/directions_over.gif','../images/buttons_over/dailydozen_over.gif','../images/buttons_over/testimonials_over.gif','../images/buttons_over/contact_over.gif','../images/buttons_over/home_over.gif')">
            <table border="0" cellpadding="0" cellspacing="0">
            <tbody>
                <tr>
                    <td valign="top" align="left"><img src="images/sidebarflag.gif" width="77" height="27" /></td>
                    <td align="center" height="20" valign="top"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Home','','images/buttons_over/home_over.gif',1)"><img src="images/buttons_off/home_off.gif" alt="Home Button" name="Home" width="102" height="27" border="0"></a></td>
                    <td align="center" valign="top"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Facility Button','','images/buttons_over/facility_over.gif',1)"><img src="images/buttons_off/facility_off.gif" alt="Facility" name="Facility Button" width="102" height="27" border="0"></a></td>
                    <td align="center" valign="top"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Boot Camp','','images/buttons_over/bootcamp_over.gif',1)"><img src="images/buttons_off/bootcamp_off.gif" alt="Boot camp" name="Boot Camp" width="102" height="27" border="0"></a></td>
                    <td align="center" valign="top"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Yearly Events','','images/buttons_over/events_over.gif',1)"><img src="images/buttons_off/events_off.gif" alt="Yearly Events" name="Yearly Events" width="102" height="27" border="0"></a></td>
                    <td align="center" valign="top"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Contact','','images/buttons_over/contact_over.gif',1)"><img src="images/buttons_off/contact_off.gif" alt="Contact Mr. Bill Fitness" name="Contact" width="102" height="27" border="0"></a></td>
                    <td align="center" valign="top"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Directions','','images/buttons_over/directions_over.gif',1)"><img src="images/buttons_off/directions_off.gif" alt="Directions" name="Directions" width="102" height="27" border="0"></a></td>
                    <td align="center" valign="top"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Daily Dozen','','images/buttons_over/dailydozen_over.gif',1)"><img src="images/buttons_off/dailydozen_off.gif" alt="Daily Dozen " name="Daily Dozen" width="102" height="27" border="0"></a></td>
                    <td align="center" valign="top"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Testimonials','','images/buttons_over/testimonials_over.gif',1)"><img src="images/buttons_off/testimonails_off.gif" alt="Testimonials" name="Testimonials" width="102" height="27" border="0"></a></td>
                    <td valign="top" align="right"><img src="images/sidebarflag.gif" width="77" height="27" /></td>
                </tr>
            </tbody>
            </table>
<!-- #EndLibraryItem --></td>
    </tr>
    <tr>
        <td align="center" bgcolor="#ffffff" valign="top"><img src="images/buttonsdropshadow.gif" width="816" height="8"/></td>
    </tr>
</tbody>
</table>
</center>
<!-- #EndLibraryItem -->