Ver Mensaje Individual
  #7 (permalink)  
Antiguo 23/11/2012, 18:02
bellacord2
 
Fecha de Ingreso: septiembre-2009
Mensajes: 97
Antigüedad: 14 años, 7 meses
Puntos: 0
Respuesta: pasar variables de sasp a j

ok....

este es el codigo asp
Código:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
	<!-- #include file="../../asp/logon.asp" -->
		<%Dim Titulo, strPath
		if Request("tpe")="" then Response.Redirect("../../herramientas/confirmacion.asp?res=error&msg=Debe seleccionar un tipo de auxiliar para poder continuar")
		strParametros = "te=" & Request("te") & "&idc=" & Request("idc")
		if Request("id") <> "" then strParametros = strParametros & "&id=" & Request("id")
		if Request("tpe") <> "" then strParametros = strParametros & "&tpe=" & Request("tpe")
		strListado="entidades.asp?" & strParametros
		strTipoDat="Entidades"
		select case Request("tpe")
			case "1"
				if Request("id") <> "" then
					Titulo = "Editar Cliente"
				else
					Titulo = "Crear un nuevo cliente"
				end if
			case "2"
				if Request("id") <> "" then
					Titulo = "Editar Proveedor"
				else
					Titulo = "Crear un nuevo proveedor"
				end if
			case "3"
				if Request("id") <> "" then
					Titulo = "Editar Trabajador"
				else
					Titulo = "Crear un nuevo trabajador"
				end if
			case "4"
				if Request("id") <> "" then
					Titulo = "Editar Registro"
				else
					Titulo = "Crear un nuevo registro"
				end if
		end select
		strPath = "../../general/"
		strIcono="contab-05.png"
		%>
	<!-- #include file="../../general/encabezado.asp" -->
    	<!-- #include file="contab_titulodet.asp" -->
	
        <tr height="20"><td colspan="2" align="left" valign="top">&nbsp;</td></tr>
        <tr valign="top"><td colspan="2" align="left" valign="top">
			  <%
                if Request("id") <> "" then
                    Set Entidad = gVisita.Usuarios.Usuario(Session("Usr")).Entidades(Request("tpe")).Entidad(Request("id"))
                    strCodigo = Entidad.Codigo
                    strNombre = Entidad.Nombre
					strNombreAdic = Entidad.NombreAdic
                    strCorreoElectronico = Entidad.CorreoElectronico
					lngCod_Grupo = Entidad.Cod_Grupo
					strTelefono1 = Entidad.Telefono1
					strTelefono2 = Entidad.Telefono2
					strTelefono3 = Entidad.Telefono3
					strDireccion = Entidad.Direccion
					strDireccionAdic = Entidad.DireccionAdic
					if Entidad.CobrarDirecAdic then
						blnCobrarDir2 = "CHECKED"
					else
						blnCobrarDir2 = ""
					end if
                    if Entidad.Inactivo then
                        blnInactivo = "CHECKED"
                    else
                        blnInactivo = ""
                    end if 
				else
                    strCodigo = ""
                    strNombre = ""
					strNombreAdic = ""
                    strCorreoElectronico = ""
					lngCod_Grupo = 0
					strTelefono1 = ""
					strTelefono2 = ""
					strTelefono3 = ""
					strDireccion = ""
					strDireccionAdic = ""
					blnCobrarDir2 = ""
					blnInactivo = ""
                end if
              %>	
              <table width="98%" border="0" cellspacing="0" cellpadding="0" align="center">
                <tr height="25">
                  <td width="15%" valign="top">Código</td>
                  <td width="85%"><input name="txtCodigo" type="text" id="txtCodigo" size="20" maxlength="20" value="<%=strCodigo%>"></td>
                </tr>
                <tr height="25">
                  <td valign="top">Nombre</td>
                  <td ><input name="txtNombre" type="text" id="txtNombre" size="100" maxlength="100" value="<%=strNombre%>"></td>
                </tr>
                <tr height="25">
                  <td valign="top">Nombre corto</td>
                  <td ><input name="txtNombreAdic" type="text" id="txtNombreAdic" size="50" maxlength="100" value="<%=strNombreAdic%>"></td>
                </tr>
                <tr height="25">
                  <td valign="top">Correo electrónico</td>
                  <td ><input name="txtCorreoElectronico" type="text" id="txtCorreoElectronico" size="50" maxlength="100" value="<%=strCorreoElectronico%>"></td>
                </tr>
                      <%
                      strNombreCombo = "cmbTipoEnt"
                      strTabla = "CTT_ENTIDADES_GRUPOS_CLASIFICACIONES"
                      strPrefijo = "CLS"
                      strClaveTexto="0"
                      strDonde = ""
                      blnBlanco = False
					  Redirigir = ""
                      strPredeterminado = Request("tpe")
					  blnOculto = True
                      %>
                      <!-- #include file="../../herramientas/llenarcombo.asp" -->	
                <tr height="25">
                  <td valign="top">
                 <a href="#" onclick="abreVentana()"><font color="blue">Grupo</font></a></td>
                  <td>
                      <%
                      strNombreCombo = "cmbGrupo"
                      strTabla = "GEN_ENTIDADES_GRUPOS"
                      strPrefijo = "GRP"
                      strClaveTexto="0"
                      strDonde = "GRP_COD_CLASIFICACION = " & Request("tpe")
                      blnBlanco = False
					  Redirigir = ""
                      strPredeterminado = lngCod_Grupo
					  blnOculto = False
                      %>
                      <!-- #include file="../../herramientas/llenarcombo.asp" -->	
                  </td>
                </tr>
                <tr height="25">
                  <td valign="top">Teléfono 1</td>
                  <td ><input name="txtTelefono1" type="text" id="txtTelefono1" size="30" maxlength="50" value="<%=strTelefono1%>"></td>
                </tr>
                <tr height="25">
                  <td valign="top">Teléfono 2</td>
                  <td ><input name="txtTelefono2" type="text" id="txtTelefono2" size="30" maxlength="50" value="<%=strTelefono2%>"></td>
                </tr>
                <tr height="25">
                  <td valign="top">Teléfono 3</td>
                  <td ><input name="txtTelefono3" type="text" id="txtTelefono3" size="30" maxlength="50" value="<%=strTelefono3%>"></td>
                </tr>
                <tr height="25">
                  <td valign="top">Dirección</td>
                  <td ><input name="txtDireccion" type="text" id="txtDireccion" size="100" maxlength="255" value="<%=strDireccion%>"></td>
                </tr>
                <tr height="25">
                  <td valign="top">Dirección adicional</td>
                  <td ><input name="txtDireccionAdic" type="text" id="txtDireccionAdic" size="100" maxlength="255" value="<%=strDireccionAdic%>"></td>
                </tr>
                <tr height="">
                  <td valign="top">&nbsp;</td>
                  <td ><input name="chkCobDirAdic" type="checkbox" id="chkCobDirAdic" <%=blnCobrarDir2%>>Cobrar en dirección adicional</td>
                </tr>
                <tr height="">
                  <td valign="top">&nbsp;</td>
                  <td ><input name="chkInactivo" type="checkbox" id="chkInactivo" <%=blnInactivo%>>Registro inactivo</td>
                </tr>
                <tr>
                  <td valign="top" colspan="2">&nbsp;</td>
                </tr>
              </table>
          </td></tr>
          </table>  
        </p>
	<!-- #include file="../../asp/logoff.asp" -->
    <!-- #include file="../../general/pie.asp" -->
el js tiene
Código:
var mVentana
function abreVentana(strTabla,strClaveTexto,strPrefijo,strCampoAdic,strValorAdic)
//function abreVentana()
	{
		mVentana = window.open("../../herramientas/basicos.asp?prf=+strTabla, adic=" +strTabla, "basico","scrollbars=yes,width=600,height=450,left=300,top=100")
		 
   		mVentana.focus()
 
  	}

function addTipo(pref)
	{
		opener.document.Listado.cmbGrupo.value = pref 
		opener.refrescar()

  	 }
function refrescar()
	{
		document.location.reload();
 
 	}