Tema: llamada asp
Ver Mensaje Individual
  #5 (permalink)  
Antiguo 15/09/2007, 08:58
rokiu
 
Fecha de Ingreso: septiembre-2007
Mensajes: 72
Antigüedad: 17 años, 7 meses
Puntos: 1
Re: llamada asp

muevelo, no tengo problema, es por n abrir otro post!

Sigue sin funcionar, mira te explico, tengo dos listas dependientes, cdogo:
<%
usu=session("usuario")
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "bloggus"
idblog_form = request.form("idblog")
Set RS = Server.CreateObject("ADODB.Recordset")
%>
<HTML>
<head>
<title>Nuevo usuario Bloggus</title>

<script language="Javascript">
function Enviar(idpost)
{
alert("llega")
location.href="eliminar_aportacion.asp?post=idpost ";

}

function ResetForm()
// reseteamos el formulario
{
document.formulario.reset();
}
</script>

</HEAD>
<body bgcolor="#D8E5EA" text="#003366">
<center><h1><font face="forte" color="#003366">Eliminar Aportacion</font></h1>

<FORM width="60" style="border:1px solid #003366" method="post" action="borrar_aportacion.asp" name="formulario">
<table border=0 width="707" cellpadding="3" cellspacing="3">


<tr>
<td width="15%" valign="top" align="left">
Titulo del Blog:</td>
<td width="28%" valign="top" align="left">

<SELECT name="idblog" onchange="formulario.submit();">
<option value="">
<%

sSTR= " select * from blogs where (idusu=("&usu&"));"
Set Rs = Conn.Execute(sSTR)

do while not RS.EOF
blog = RS("titulo")
idblog = RS("idblog")

%>
<OPTION <% if CStr(idblog) = CStr(idblog_form) then response.write "SELECTED" %> value="<%= idblog%>"><%= blog %></OPTION>
<%
RS.MoveNext
loop
RS.Close
%>
</select>
</td>

<%
if idblog_form <> "" then
sSTR_1 = "SELECT * FROM aportaciones WHERE idblog = "& idblog_form

%>
<td width="23%" valign="top" align="left">
Titulo de la aportacion:</td>
<td width="74%" valign="top" align="left">
<SELECT name="lista2" id="post">
<option value="">
<%
Set Rs = Conn.Execute(sSTR_1)
do while not RS.EOF
titulo = RS("titulo")
idpost = RS("idpost")
%>
<OPTION value="<%= idpost %>"><%= idpost %></OPTION>
<%
RS.MoveNext
loop
RS.Close
%>
</select>
</td>
</tr>
<%
end if
%>
</center>
</table>
</form>

<center>

<script language="Javascript">
var idpost = document.GetElementById("post");
</script>
<img OnClick='Enviar(idpost)' src="../imagenes/enviar.jpg" alt="Reiniciar" width="100" height="20">
&nbsp;
<img OnClick='ResetForm()' src="../imagenes/reiniciar.jpg" alt="Reiniciar" width="100" height="20">
</center>
</BODY>
</HTML>
<%
Set RS = Nothing

Conn.Close
Set Conn = Nothing
%>

Entonces el action del form, esta ocupado pk se tiene que autollamar, para que la segunda lista tome valores. y el valor que toma en la segunda lista lo quiero enviar a otro asp, pero no me funciona como me as dixo.