codice:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="script.js" type="text/javascript"></script>
<title>Documento senza titolo</title>
</head>

<body>

<form id="processform" name="processform">
<select name="ids" id="ids">

<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>

</select>
</form>

<script type="text/javascript">xselectvalue("processform","ids","2");</script>

</body>
</html>
dove xselectvalue non è altro che:

codice:
function xselectvalue(idform,idselect,value) {
	var sel = document.idform.idselect;
	sel.value=value;
}