473,322 Members | 1,425 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Sticky Rollovers

I trying to build a navigation bar for my company's website.

We have different sections, Home, About, Product, etc.

I have made the graphics and the basic JS for the Rollovers.

To indicate which section a user is in, I would like to have all the pages
in the Home section show the Home graphic as a reversed version, and so on
for the other sections.

I already have the reversed version of the graphic and I could go and
change the code for each section, but I would like to have somekind of
code that I just plunked down on each page.

Can anybody give me pointers? A link to a tutorial? etc?

Jul 23 '05 #1
2 1216
Rothrock wrote:
To indicate which section a user is in, I would like to have all the pages
in the Home section show the Home graphic as a reversed version, and so on
for the other sections.

I already have the reversed version of the graphic and I could go and
change the code for each section, but I would like to have somekind of
code that I just plunked down on each page.

Can anybody give me pointers? A link to a tutorial? etc?


You could adopt a naming scheme for your document title, e.g.:

<title="Contact our representatives">

Then if you key on first word, be sure name your image accordingly:
<img src="contact.gif" name="contact">
And then change the source:

<script>
k= document.title.split(" ")[0].toLowerCase()// contact

document.images[k].src=k+"Reversed.gif"
//document.images["contact"].src="contactReversed.gif"
</script>
Mick
Jul 23 '05 #2
Clever! I hadn't thought of using the title like that. I'm going to give it
a try. Thank you.

Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: gallery | last post by:
I also cross-posted this in comp.infosystems.www.authoring.html. I think it's more appropriate here. I read somewhere that you can get Tim Murtaugh's Mo' Betta Rollovers to work in Firefox using...
10
by: idiotprogrammer | last post by:
Hi, there, I'm trying to do something, and part of the problem is that I don't know how to describe the effect. One block will have a list of links stacked over one another and separated by p...
2
by: Frances Del Rio | last post by:
Hi, I while back I was having a problem with rollovers, even though I do them in a very conventional way: function roll(i) { document.src = eval(i + "_roll.src") } // in which value passed...
3
by: Shahid Juma | last post by:
Hi, Is it possible to do roll overs over an area of an image. I know you can setup up a hotspot but can a roll over be done on that particular hotsop. Additionally, when the image changes on the...
3
by: Norman Swartz | last post by:
Rollovers on a web page I created were instantaneous on my computer when the page was loaded directly from my hard drive, but were painfully slow when loaded from the web. However, on another...
7
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - Why are my Rollovers so slow? ----------------------------------------------------------------------- Images...
9
by: student4lifer | last post by:
Hello, could someone show me how to make sticky form with dynamically generated form element? for example, if one likes to make the dynamically generated check box (and its name) 'sticky' that...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.