Java script header not finding image

northernknight
northernknight used Ask the Experts™
on
We are working on a website www.gatornationband.com .  The "About Us" page was inadvertently deleted by the customer.  The website is a basic HTML  site, but has a JS header.  We re-created the page but the header has a script that changes images.  The first one resolves fine, but the second one doesn't show the image.  It takes about 5 seconds to change.

The code seems the same as all the other pages of the site, which work fine.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Russ SuterSenior Software Developer

Commented:
I just loaded the page and I see 2 images. The first is the words "Gator Nation Band" and the second is an alligator wearing sunglasses and... body armor?
Dave BaldwinFixer of Problems
Most Valuable Expert 2014

Commented:
The second image 'GNB-WebHeaderLogo.jpg' is either spelled wrong or missing from the server.
Dave BaldwinFixer of Problems
Most Valuable Expert 2014

Commented:
Now I'm seeing it at 'images/GNB-WebHeaderLogo.jpg'.
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Author

Commented:
It works on all the pages except the "about" page.
Most Valuable Expert 2013
Awarded 2012
Commented:
Hi,
you simply have a wrong reference to the Images.

Instead of
"images/GNB-WebHeaderBand.jpg"

Open in new window

which ends up in the subfolder "/about/Images/..."
use
"../images/GNB-WebHeaderBand.jpg"

Open in new window


- the leading "../" is the key

HTH
Rainer

Author

Commented:
Thank you

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial