Menu using Include

B

Beverly-Texas

Hi,

I've used an include to bring in my nav bar onto all the pages of a website.
Problem is, my client wants to see the menu item highlighted (underlined)
when you are on that particular .htm page. I don't know how, or if you can,
modify part of the include, depending on which page you are on?

Thanks,
Beverly
 
T

Thomas A. Rowe

This can be done if the entire site is based on Server-Side scripting, such as ASP, etc.

--
==============================================
Thomas A. Rowe
Microsoft MVP - FrontPage
==============================================
Agents Real Estate Listing Network
http://www.NReal.com
==============================================
 
M

Murray

It's easy to do with CSS or with javascript.

With CSS you would have a little stylesheet embedded in the head of each
page that allows you to set the down state for any given button (each button
would have a unique id - for example -

<a href="foo.html" id="button1">...<a href="bar.html" id="button2">

and then your stylesheet would have this -

a#button1 { styles }

on one page, and on another this -

a#button2 { styles }

See how that works?

With javascript, put this in script tags in the head of the document -

function P7_downImage() {
var g7="<imagename>"
var g7url="<pathname>"
if ((g7=MM_findObj(g7))!=null) {g7.src=g7url;}
}

and this on the <body> tag

onload="P7_downImage()"

Then on each page you would need to make two edits:

Set g7 to the *name* of the button (not the file name but the HTML name -
e.g., "productsbutt"), and g7url to the pathname to the button (e.g.,
"images/nav/button3.gif"), and bada bing, bada boom!

There is an excellent tutorial here -

http://www.projectseven.com/support/answers.asp?id=126
 
B

Beverly-Texas

Thanks!! I'll try that!

Murray said:
It's easy to do with CSS or with javascript.

With CSS you would have a little stylesheet embedded in the head of each
page that allows you to set the down state for any given button (each button
would have a unique id - for example -

<a href="foo.html" id="button1">...<a href="bar.html" id="button2">

and then your stylesheet would have this -

a#button1 { styles }

on one page, and on another this -

a#button2 { styles }

See how that works?

With javascript, put this in script tags in the head of the document -

function P7_downImage() {
var g7="<imagename>"
var g7url="<pathname>"
if ((g7=MM_findObj(g7))!=null) {g7.src=g7url;}
}

and this on the <body> tag

onload="P7_downImage()"

Then on each page you would need to make two edits:

Set g7 to the *name* of the button (not the file name but the HTML name -
e.g., "productsbutt"), and g7url to the pathname to the button (e.g.,
"images/nav/button3.gif"), and bada bing, bada boom!

There is an excellent tutorial here -

http://www.projectseven.com/support/answers.asp?id=126
 
B

Beverly-Texas

Ohhh... Not familiar with ASP, unfortunately.

Thomas A. Rowe said:
This can be done if the entire site is based on Server-Side scripting, such as ASP, etc.

--
==============================================
Thomas A. Rowe
Microsoft MVP - FrontPage
==============================================
Agents Real Estate Listing Network
http://www.NReal.com
==============================================
 
T

Thomas A. Rowe

See Murray's reply.

--
==============================================
Thomas A. Rowe
Microsoft MVP - FrontPage
==============================================
Agents Real Estate Listing Network
http://www.NReal.com
==============================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top