Need to add onMouseOver actions to select menu created with 'newoption' objects

S

speedbird

I inherited some code that generates a multiple select menu using the
'new Option()' syntax. I want to modify this to add onMouseover,
onClick, and onMouseout events to each option as it's generated. Is
it possible?

Code:

document.forms[this.formname][this.textname].focus();
var j = 0;
for(var i=0;i<this.optionSet.length;i++) {
document.forms[this.formname][this.selname].options[j++] = new
Option(this.optionSet.text, this.optionSet.value);
}
document.forms[this.formname][this.selname].options.length=j;
 

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

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top