Ver Mensaje Individual
  #4 (permalink)  
Antiguo 16/11/2005, 00:20
RossanaIsabel
 
Fecha de Ingreso: octubre-2004
Ubicación: Venezuela
Mensajes: 111
Antigüedad: 20 años, 5 meses
Puntos: 0
Gracias a JuanRAPerez por el link bastante bueno y a Myakire.
Logré hacerlo pero no me hace ningún efecto, a ver que pueden observar ustedes que esté mal. Saludos.

...
<head>
<script language = "JavaScript">
<% Set conexion = Server.CreateObject("ADODB.Connection")
conexion.open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("\base_datos.mdb"))
sql = "select titulo from contenido"
set rs = conexion.execute(sql) %>

////////////////// FUNCION COMBO BOX DINÁMICO

function sublist(inform, selecteditem)
{
inform.subcatagory.length = 0

<%
count= 0
y=0
do while not rs.eof
%>

x = <%= trim(y) %>;

subcat = new Array();
subcatagorys = "<%=(rs("titulo"))%>";
subcat[x,0] = subcatagorys;
<%
count = count + 1
y = y + 1
rs.movenext
loop
rs.close
%>
}

</script>
</head>


<body>
<table>
<form name="formu2" >

<% sql = "select distinct nombre_curso from contenido"
set rs2 = conexion.execute(sql)%>

<tr>
<td align="left" width="150">Seleccionar curso:
</td>
<td align="left" width="170"><SELECT NAME="selecurso" SIZE = "1" STYLE ="Width:265px" onChange = "javascript:sublist(this.form, selecurso.value);">
<OPTION>Seleccione uno</option>
<% do while rs2.eof=false%>
<OPTION><%=RS2("nombre_curso")%></option>
<%
rs2.movenext
loop%>
</td>
</SELECT>

<tr>
<td align="left" width="150">Título:
</td>
<td align="left" width="170"><SELECT id="subcatagory" name="subcatagory"SIZE = "1" STYLE ="Width:265px" disabled>
<Option selected value="none"></option>
</td>
</SELECT>

<INPUT NAME="boton" TYPE="submit" VALUE="Eliminar"></center>
</form>
<%conexion.close
set rs = nothing
set rs2 = nothing%>

....
__________________
Has resucitado mi :corazon: que estaba muerto y sin salvación