<script type="text/javascript">
function resetLists(){
document.forms["body"].elements["select1"].selectedIndex = 1;
document.forms["body"].elements["select2"].selectedIndex = 1;
}
</script>
</head>
<!--Start the html body-->
<body id="body" onload="isColorSet()">
<form action="" onsubmit="return false;">
<form id="body">
<!--This is where the changes happen-->
<div id="test">This is supposed to be a nice little navbar. Select a new font to change this one's</div>
</br>
</br>
<div id="position" style="visibility:visible;position:absolute;bottom:0px; right:0px">
<center>
<table width="100%" border ="4" background="raindrop.jpg" >
<td>
<select name="select1" onchange="newFont(this.value);">
<option value="">Font Family</option>
<option value="Arial">Arial</option>
<option value="Helvetica">Helvetica</option>
<option value="Tahoma">Tahoma</option>
<option value="Times New Roman">Times New Roman</option>
<option value="Verdana">Verdana</option>
</select>
</td>
<td>
<select name="select2" onchange="newFontColor(this.value);">
<option value="">Font Color</option>
<option value="Black">Black</option>
<option value="Blue">Blue</option>
<option value="Green">Green</option>
<option value="Orange">Orange</option>
<option value="red">Red</option>
<option value="Violet">Violet</option>
<option value="Yellow">Yellow</option>
</select>
</td>
<td>
<button onclick="resetLists()">Reset</button>
</td>
here is my code
it works when i test it using a blank listbox with no value
but it is not working with the color value
it says Error:document.forms.body.elements is null or not an object
any idea?
thank you
ayi