phillystyle123
asked on
$crumb="services" - navigation "over image" trick not working
I've got:
<?php $crumb="services";?>
at the very top of my page: services/index.php
then in includes/header.php
i've got this:
<img src="<?php if ($crumb=="services") { echo "../images/nav/services-ov er.gif"; } else { echo "../images/nav/services.gi f"; } ?>"
problem is the crumb isn't being spotted so i'm seeing services.gif and not services-over.gif .
here's the code from the top of services/index.php - thanks in advance for the help!
<?php $crumb="services";?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>
<? include 'http://www.healthpresence.com/familymedicine/site/includes/title.php'; ?> <? include 'http://www.healthpresence.com/familymedicine/site/includes/title-dr.php'; ?>
</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<? include 'http://www.healthpresence.com/familymedicine/site/includes/scripts.php'; ?>
</head>
<body onLoad="MM_preloadImages(' ../images/ nav/about- over.gif', '../images /nav/servi ces-over.g if','../im ages/nav/f orms-over. gif','../i mages/nav/ insurance- over.gif', '../images /nav/locat ion-over.g if','../im ages/nav/h ome-over.g if')">
<div id="all">
<div id="container"><div id="content">
<? include 'http://www.healthpresence.com/familymedicine/site/includes/header.php'; ?>
<?php $crumb="services";?>
at the very top of my page: services/index.php
then in includes/header.php
i've got this:
<img src="<?php if ($crumb=="services") { echo "../images/nav/services-ov
problem is the crumb isn't being spotted so i'm seeing services.gif and not services-over.gif .
here's the code from the top of services/index.php - thanks in advance for the help!
<?php $crumb="services";?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>
<? include 'http://www.healthpresence.com/familymedicine/site/includes/title.php'; ?> <? include 'http://www.healthpresence.com/familymedicine/site/includes/title-dr.php'; ?>
</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<? include 'http://www.healthpresence.com/familymedicine/site/includes/scripts.php'; ?>
</head>
<body onLoad="MM_preloadImages('
<div id="all">
<div id="container"><div id="content">
<? include 'http://www.healthpresence.com/familymedicine/site/includes/header.php'; ?>
ASKER
this is exactly what i already have:
<?php $crumb="services";?>
is at the top of my services.php page
and in my includes/header.php i have:
<a href="http://healthpresence.com/familymedicine/site/services/index.php" onMouseOut="MM_swapImgRest ore()" onMouseOver="MM_swapImage( 'services' ,'','http://healthpresence.com/familymedicine/site/images/nav/services-over.gif',1)"><i mg src="<?php if ($crumb=="services") { echo "http://healthpresence.com/familymedicine/site/images/nav/services-over.gif"; } else { echo "http://healthpresence.com/familymedicine/site/images/nav/services.gif"; } ?>" alt="Murdock Family Medicine - Services" name="services" width="54" height="26" border="0"></a>
<?php $crumb="services";?>
is at the top of my services.php page
and in my includes/header.php i have:
<a href="http://healthpresence.com/familymedicine/site/services/index.php" onMouseOut="MM_swapImgRest
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
hernst42 - that was exactly the problem - thanks for the help!
The code should look like (pathen to includes from index.php might be wrong):
<?php $crumb="services";?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>
<? include '../familymedicine/site/in
</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<? include ../familymedicine/site/inc
</head>
<body onLoad="MM_preloadImages('
<div id="all">
<div id="container"><div id="content">
<? include '../familymedicine/site/in
The the variable $crumb should be present in your header.php