Please help, where am I going wrong?
I am trying to change the colour of a table cell using a combo box. It works with buttons, but I can’t get it to work with the combo box..
Thanks for your help
[QUOTE]
<FORM NAME=”mycombo”>
<SCRIPT LANGUAGE=”javascript”>
function go()
{
var i = document.mycombo.colour.options[document.mycombo.colour.selectedIndex].value
var l = document.getElementById(‘page’)
// get element table(by id page)
l.style.backgroundColor = i; }
}
</SCRIPT>
<P><SELECT NAME=”colour” SIZE=”1″>
<OPTION VALUE=”yellow”>Yellow</OPTION>
<OPTION VALUE=”red”>Red</OPTION>
<OPTION VALUE=”blue”>Blue</OPTION></SELECT><INPUT TYPE=”button” VALUE=”Go” ONCLICK=”go()”></P>
<P> </P></FORM>[/QUOTE]