[WSG] Looking for help with standard-based JS rollovers

2005-09-14 Thread Seona Bellamy

Hi guys,

Here's an outline of the requirements:
The site I'm working on has a dynamically-generated menu (a nested  
list with Son of Suckerfish dropdowns) running horizontally  
underneath the banner section. In order to add a little more life and  
interest to the pages, we want to have the banner change as you roll  
the mouse over the menu items - each section has its own banner, so  
if I roll over Reading Room the banner will change to show the  
reading room banner image. The banner image is currently set as a  
background on the header container.


The problem: I'm not that great at Javascript. *grin*

So can anyone point me at (or give me) some appropriate code, please?  
It would be greatly appreciated.


Cheers,

Seona.
**
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
**



Re: [WSG] Looking for help with standard-based JS rollovers

2005-09-14 Thread Jorge Colon
If you have some knowledge of arrays you might be able to do it. First of
all you have to separate the behavioral part from the document, just as you
would have separated the presentational part from the document part. It
degrades nicely in browsers that either don't support Javascript or
Javascript is disabled. Read this article on Adactio:
http://adactio.com/articles/display.php/this_year's_document_object_model/9

Okay, now just thinking about this, this is the logic that I would use. Make
two two-dimensional arrays one being called links and the other one
rollovers. For each corresponding link there will be a URL to the image.
When you hover over the link, the action will be triggered, the URL for the
image changes to the corresponding link, and visually you see that the image
changes. If you can't do it or can't find someone to do it, I'm available
for hire.

Sincerely,
Jorge Colon

**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list  getting help
**