Ver Mensaje Individual
  #5 (permalink)  
Antiguo 15/01/2003, 00:10
Avatar de ivan02
ivan02
 
Fecha de Ingreso: diciembre-2001
Mensajes: 449
Antigüedad: 23 años, 4 meses
Puntos: 2
muchas gracias por el codigo te agradesco mucho lamentablemente no jala este es el codigo de mi galeria

esta en www.cat-soft.net/cat




<title></title>
<script language = "JavaScript">



<%'CONSULTA PARA OBTENER LOS DATOS
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("hard.mdb"))



productos_Sql = "Select distinct familia, codigo, denominacion from articulos "
set rs = CreateObject("ADODB.Recordset")
rs.Open productos_Sql, Conn
x=0
%>

// FUNCION DE COMBO BOX COMBINADO

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("codigo"))&" "&(rs("denominacion")) %>";
subcatagoryof = "<%=(rs("familia"))%>";
subcatagoryid = "<%=(rs("codigo"))%>";
subcat[x,0] = subcatagorys;
subcat[x,1] = subcatagoryof;
subcat[x,2] = subcatagoryid;
if (subcat[x,1] == selecteditem) {
var option<%= trim(count) %> = new Option(subcat[x,0], subcat[x,2]);
inform.subcatagory.options[inform.subcatagory.length]=option<%= trim(count)%>;
}
<%
count = count + 1
y = y + 1
rs.movenext
loop
rs.close
%>
}

</script>
<base target="">
<head>

<body>




///aqui esta el problema
<form name="prueba" method="POST" action="verarticulo.asp" method="post" target="ventana" onsubmit="window.open(verarticulo.asp,'ventana',wi dth=30,height=50,scrollbars=yes,
status=yes,resizable=yes)">

///



<div align="center" style="width: 555; height: 237">
&nbsp;
<table border="0" width="14%">
<tr>

<td width="81%">
<p align="left">
<select size="1" id="familia" name="familia" onChange = "javascript:sublist(this.form, familia.value);">

<option selected>Seleccine un articulo</option>
<%familias_Sql = "Select distinct id,familia from familias"
rs.Open familias_Sql, Conn
do while not rs.eof
%>
<option value="<%=rs("id")%>"><%=rs("familia")%></option>


<%rs.movenext
loop
set rs=nothing
conn.close
set conn=nothing%>
</select>


</body>