Guest_imported
New member
- Jan 1, 1970
- 0
- 0
- 0
The following is in the head of an html document:
<script language="javascript">
function chg_box('item_name', switch)
{ {
item_name.style.backgroundColor = '999999';
}
if(switch == 1)
else
{
item_name.style.backgroundColor = '993333';
}
}
</script>
In the body of the html document I have this:
<div class="item" id="Gold River" onmouseover="chg_box('Gold River', 1);" onmouseout="chg_box('Gold River', 0);">Gold River</div>
When I open the page I get an error
line 12 character 21 identifier expected
which corresponds to the first ' in the function definition in the head of the document.
If I mouseover or mouseout on the div I get this error
line 30 character 1 object expected
which corresponds to the beginning of the line with the div on it.
Please let me know if you have any suggestions.
<script language="javascript">
function chg_box('item_name', switch)
{ {
item_name.style.backgroundColor = '999999';
}
if(switch == 1)
else
{
item_name.style.backgroundColor = '993333';
}
}
</script>
In the body of the html document I have this:
<div class="item" id="Gold River" onmouseover="chg_box('Gold River', 1);" onmouseout="chg_box('Gold River', 0);">Gold River</div>
When I open the page I get an error
line 12 character 21 identifier expected
which corresponds to the first ' in the function definition in the head of the document.
If I mouseover or mouseout on the div I get this error
line 30 character 1 object expected
which corresponds to the beginning of the line with the div on it.
Please let me know if you have any suggestions.