PDA

View Full Version : Can I assign onmouseover to an item in an array


JlynnMc10
02-14-2003, 10:39 PM
I have an array of icons that are created into a menu, and I wanted when the mouse moved over one of the icons I wanted a function to be called. Can I do this with items in an array?? If so how??

brothercake
02-15-2003, 05:27 PM
A number of ways - it depends what you're starting with and what you want it to work in.

Are you script-compiling the image HTML and the document.writing it into the page? Or do you want to be able to attach behaviours afterwards?

JlynnMc10
02-19-2003, 06:05 AM
I am just using text for right now, but this is the setup: I create an array in my .js file based on the data passed to the .js from the html.
But I would like add the following functions to one of the items of the array:
onmouseout="CeaseScroll();window.status='';return true;"
onmouseover="PerformScroll(-1);window.status='Scroll Up';return true"
How would I do this and would I add the code to my current .js file or somewhere in the html????