Foros del Web » Programando para Internet » Javascript »

Problema con popup!!!!

Estas en el tema de Problema con popup!!!! en el foro de Javascript en Foros del Web. Tengo un problema, como paso una variable que selecciono de un combo box a un pop up???????. Tengo el siguiente codigo para la ventana principal: ...
  #1 (permalink)  
Antiguo 03/07/2003, 11:16
Usuario no validado
 
Fecha de Ingreso: abril-2002
Ubicación: Mexico
Mensajes: 56
Antigüedad: 22 años
Puntos: 0
Problema con popup!!!!

Tengo un problema, como paso una variable que selecciono de un combo box a un pop up???????.
Tengo el siguiente codigo para la ventana principal:
<!--#include file ="VBLibServidor.asp"-->
<html>
<head>
<title>Formulario prefijos</title>
<script>
var miPopup
function abreVentana(){
miPopup = window.open("localidad.asp?mun="+mun,"miwin","widt h=300,height=150,scrollbars=yes")
miPopup.focus()

}
</script>
<script language="VBScript">
Function Actualiza
mun=Forma.AMunicipi.value
' MSGBOX "Muncipio "&mun,vbOKOnly,"Mensaje del Sistema"'
End Function
</script>
</head>
<body>
<form name=forma>
<% SET oHandle=Server.CreateObject("ADODB.Connection")
oHandle.Open "Oracle8"
CSqlString = "Select amunicipi, alocalida,CLoDescri "&_
"from actauditoria,actclocalida "&_
"where alocalida=cloclave(+) and anciaudi=1"
SET oRegistro = oHandle.Execute(CSqlString)
%>
<table cellspacing="3" cellpadding="3" border="0">
<tr>
<td> Municipio </td>
<td align="center">Localidad</td>
</tr>
<tr>
<td> <SELECT name="AMunicipi" onChange="Actualiza();">
<%
SET oHandleMu=Server.CreateObject("ADODB.Connection")
oHandleMu.Open "Oracle8"
CSqlString = "SELECT CMuClave,CMuDescri " &_
"FROM SITCMunicipi " &_
"WHERE CMuClave>'000' "&_
"ORDER BY CMuClave "
SET oRegistroMu = oHandleMu.Execute(CSqlString)
WHILE NOT oRegistroMu.EOF
%>
<OPTION VALUE="<%=oRegistroMu("CMuClave")%>"
<% Seleccionado oRegistroMu("CMuClave"),oRegistro("AMunicipi")%>>
<%=oRegistroMu("CMudescri")%>
</OPTION>
<%
oRegistroMu.MoveNext
WEND
oRegistroMu.Close
oHandleMu.Close %>
</SELECT>
</td>
<td align="center"> <input type="text" name="prefijo" value="<%=oRegistro("CLoDescri")%>" size="20" >
<input type="Button" value="?" onClick="abreVentana()"> </td>
</tr>
</table>
</form>
</body>
</html>

Y tengo el siguiente para el pop up:

<!--#include file ="VBLibServidor.asp"-->
<html>
<LINK rel="stylesheet" href="sac.css" type="text/css">
<head>
<title>Localidades</title>
<script>
function ponPrefijo(pref){
opener.document.forma.prefijo.value = pref
submit()
window.close()
}
</script>
</head>
<body>
<form name=fprefijos action="Munici.asp" method="post">
<%SET oHandleLo=Server.CreateObject("ADODB.Connection")
oHandleLo.Open "Oracle8"
CSqlString = "SELECT CLoMunici,CLoClave,CLoDescri " &_
"FROM ACTCLocalida " &_
"WHERE CLoMunici="&CheckString(request(mun)," ")&_
"ORDER BY CLoMunici,CLoClave "
response.write csqlstring
SET oRegistroLo = oHandleLo.Execute(CSqlString)
IF oRegistroLo.Eof THEN
response.write "No hay registros"
ELSE
%>
<TABLE width="100%" border=0 cellPadding=0 cellSpacing=0>
<TBODY>
<TR>
<TD align=middle> <TABLE width="100%" border=0 align="center" cellPadding=0 cellSpacing=0>
<TBODY>
<TR>
<TD colSpan=2></TD>
<TD bgColor=#d9d9d9><IMG height=1 alt="" src="imagen/block.gif" width=1></TD>
</TR>
<TR>
<TD></TD>
<TD width=3 background="imagen/tab_back2.gif" bgColor=#ebe7e0>
<IMG height=3 alt="" src="imagen/tab_tl.gif" width=3></TD>
<TD background="imagen/tab_back2.gif" bgColor=#ebe7e0> <IMG height=1 alt="" src="imagen/block.gif" width=1></TD>
<TD vAlign=top width=3 background="imagen/tab_back2.gif" bgColor=#ebe7e0>
<IMG height=3 alt="" src="imagen/tab_tr.gif" width=3></TD>
</TR>
<TR>
<TD width=1 bgColor=#cccccc> <IMG height=1 alt="" src="imagen/block.gif" width=1></TD>
<TD background="imagen/tab_back.gif" bgColor=#ebe7e0> <IMG height=1 alt="" src="imagen/block.gif" width=1></TD>
<TD align="center" background="imagen/tab_back.gif"><B>
Catálogo de Localidades </b>
</TD>
<TD background="imagen/tab_back.gif"
bgColor=#ebe7e0><IMG height=1 alt="" src="imagen/block.gif" width=1></TD>
<TD width=1 bgColor=#5a5a5a rowSpan=5><IMG height=1 alt="" src="imagen/block.gif" width=1></TD>
</TR>
<TR>
<TD bgColor=#d9d9d9><IMG height=1 alt="" src="imagen/block.gif" width=1></TD>
<TD bgColor=#d9d9d9 colSpan=3><IMG height=1 alt="" src="imagen/block.gif" width=1></TD>
</TR>
<TR>
<TD width=1 bgColor=#cccccc rowSpan=2><IMG height=1 alt="" src="imagen/block.gif" width=1></TD>
<TD bgColor=#ffffff></TD>
<TD bgColor=#ffffff align="top"> <DIV class=bodytext>
<table width="100%" border="0" cellpadding="3" cellspacing="3">
<tr align="center" background="imagen/back1.gif">
<td colspan="4" background="imagen/back1.gif" class="Normal"><strong>Seleccione
la Localidad </strong></td>
</tr>
<% Do UNTIL oRegistroLo.EOF %>
<tr>
<td colspan="4" background="imagen/back2.gif" class="Normal">
<a href="localidad.asp" onClick="ponPrefijo(<%=CheckString(oRegistroLo("CL oDescri"),"")%>)"
class="ruta"><%=oRegistroLo("CLoDescri")%></a><br>
<input type="hidden" value="<%=oRegistroLo("CLoClave")%>" name="ALocalida">
</td>
</tr>
<% oRegistroLo.MoveNext
LOOP
END IF
oRegistroLo.close
oHandleLo.close %>
</table>
</DIV></TD>
<TD bgColor=#ffffff><IMG height=1 alt="" src="imagen/block.gif" width=1></TD>
</TR>
<TR>
<TD bgColor=#777777 colSpan=4><IMG height=1 alt="" src="imagen/block.gif" width=1></TD>
</TR>
</TBODY>
</TABLE></TD>
</TR>
</TBODY>
</TABLE>

</form>

</body>
</html>


Mi problema es que no me recupera la variable para armar el select del popup, en que estoy mal?? o como se hace? si alguien me puede ayudar, se lo voy a agradecer toda la vida!!

Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 07:56.