Prueba así:
<SCRIPT LANGUAGE="JavaScript">
function next_number(){
var num_tal=document.forms[0].num_talonario.options.selectedIndex;
<%
Dim Rs
Set Rs = Server.CreateObject("ADODB.Recordset")
Rs.ActiveConnection = MM_con1_STRING
Rs.Source =
"SELECT PROXIMO_NUM_HABILITADO FROM TALONARIOS WHERE ID=
'"&num_tal&
"'"
Rs.Open()
%>
document.forms[0].recibo.value=<%=rs("PROXIMO_NUM_HABILITADO")%>;
}
</script>
A ver...