JavaScript - Grabar lista

 
Vista:

Grabar lista

Publicado por Esmeralda (30 intervenciones) el 01/09/2001 01:12:35
Hola,alguien me podria decir porque cuando grabo una lista solo me graba el indice y no todo el contenido,como le pudiera hacer,miren tengo el siguiente codigo
...
<%@ language=VBScript %>
<%

Dim Conexion,Tabla,sql,guarda,tabla1
Set Conexion=Server.CreateObject("adodb.connection")
Set Tabla=Server.CreateObject("adodb.recordset")
Conexion.Open "productos"
if request.form("select2")<>"" then
guarda=request.form("select2")
Conexion.Execute "INSERT INTO ventas (venta) VALUES ('"&guarda&"')"
end if
%>
<form name="formas" method="post" action="tiendaindex.asp">
<input type="submit" name="Button2" value="Nuevo" OnClick="grabar(this.form)">
</form>
<script language="JavaScript">
function grabar(t)
//(AQUI SLECCIONO TODOS LOS ELEMENTOS DE LA LISTA)
for (x=0;x<t.select2.length;x++)
t.select2.options[x].selected = true;
return true;
</script>
GRACIAS POR SU ATENCION
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder