Nav Bar Links

S

skegs

Hi,
I have created a web site in frontpage. I am trying to get my nav bar links
to reflect what page they are on.
For example if I am on my home page...I would like the nav bar HOME link to
either change color or the underscore to disappear or become
italics...something along these lines so the user is aware of what page is
being viewed.
Thanks for your help.
 
T

Trevor L.

skegs said:
Hi,
I have created a web site in frontpage. I am trying to get my nav
bar links to reflect what page they are on.
For example if I am on my home page...I would like the nav bar HOME
link to either change color or the underscore to disappear or become
italics...something along these lines so the user is aware of what
page is being viewed.
Thanks for your help.

I may be just whistling in the wind, perhaps, but:
Why not give an id to each one,
e.g. the home link has id = "home"
that for about.html has id = "about"
that for pictures.html has id = "pictures", etc.
and then have some JS executed on load which says adds a background colour
to each one

<body onload="colorit();">

<!-- the nav bar tags may be something like this. I don't know as I haven't
used them -->
<!-- anyway whatever they are give an id to each one -->
<a href='index.html' id = "home">...
<a href='about.html' id = "about">...
<a href='pictures.html' id = "pictures">...

function colorit(){
var tagid = ''
switch (location.href)
{
case 'index.html':
tagid = 'home'
break
case 'about.html':
tagid = 'about'
break
case 'picture.html':
tagid = 'pictures'
}
document.getelementById(tagid).style.background-color: red
}

Or you could pass to the function the id of the tag you want coloured
<body onload="colorit('home');">

function colorit(tagid){
document.getelementById(tagid).style.background-color: red
}

I haven't tried this. Give it a go if you like it.
 
S

Stefan B Rusynko

Apply a FP theme w/ them Button images

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| Hi,
| I have created a web site in frontpage. I am trying to get my nav bar links
| to reflect what page they are on.
| For example if I am on my home page...I would like the nav bar HOME link to
| either change color or the underscore to disappear or become
| italics...something along these lines so the user is aware of what page is
| being viewed.
| Thanks for your help.
 

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