Hi there .. I have error on my firebug it says:document.getElementById("category") is null
Could someone help me??
and i wanted to set the default drop down option
<html>
<head>
<script type="text/javascript">
var i = 0;
var someValue = '4';
var mySelect = document.getElementById('category');
while(i < mySelect.options.length) {
if(mySelect.options[i].value == someValue) {
mySelect.options[i].selected = true;
}
i++;
}
</script>
</head>
<body>
<select id="category">
<option value="1" >Статика</option>
<option value="4">Статика2</option>
<option value="7">Статика3</option>
</select>
</body>
</html>