Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Problemas con pop ups

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: Spanish
View previous topic :: View next topic  
Author Message
jorge
Smarty n00b


Joined: 09 Oct 2007
Posts: 2

PostPosted: Tue Oct 09, 2007 9:50 pm    Post subject: Problemas con pop ups Reply with quote

Hola estoy tratando de realizar un pop ups con java scrip, este pop ups lo copie por ahi y me resulta con html pero cunado lo paso al template no retorna el valor seleccionado del pop ups al template gracias por lo comentarios.

CODIGO TPL.

html>
<head>
<link rel="stylesheet" type="text/css" href="menu.css">
<link rel="stylesheet" type="text/css" href="estilo.css">
<link rel="stylesheet" type="text/css" href="letras.css">

{literal}
<STYLE><!--
A.ssmItems:link {color:black;text-decoration:none;}
A.ssmItems:hover {color:black;text-decoration:none;}
A.ssmItems:active {color:black;text-decoration:none;}
A.ssmItems:visited {color:black;text-decoration:none;}
//-->
</STYLE>
<SCRIPT SRC="actividades/ssm.js" language="JavaScript1.2"></SCRIPT>
<SCRIPT SRC="actividades/ssmItems.js" language="JavaScript1.2"></SCRIPT>
{/literal}
{literal}
<script language='javascript'>

function cat_pieza()
{
cat_pieza = window.open('cont_iny_comb.php', 'nombre_pieza', 'width=500,height=300');
}
</script>

{/literal}

</head>

<body>
<div id="wrapper">
<!--
<div id="titulo">duoCRM, mejorando la interaccion con el cliente<br></div>

<div id="menuh">
<ul>
<li><a href="principal_2.php" >Inicio</a></li>
<li><a href="actividades.php">Crear</a></li>
<li><a href="modi_actividad.php ">Modificar</a></li>
<li><a href="eli_actividades.php">Eliminar</a></li>
<li><a href="">Imprimir</a></li>
<li><a href="index.php">Salir</a></li>
<li><a href="#">AAAAAAAAAAA</a></li>
<li><a href="#">AAAAAAAAAA</a></li><p>

</ul>
</div>
-->
<l1>Actividades<l1><br>

<l1>Crear Tarea<l1><br><br>

<div id="tables_1">
<form name="datos" method="post" action="datos_tarea.php">
<table> <!--BORDER="3" BORDER COLOR="#150517" -->
<tbody>
<tr>
<td >Tema :</td>
<td><input class="seleccion" type="text" name="tema" size="20" ONBLUR="claves.tema.value=claves.tema.value.toUpperCase()"</td>

<td>Estado :</td>
<td>
<form name="tipo" method="post" action="datos_tarea.php.php">
<select name="tipo" size="1" class="seleccion">
<option value="sin_partir">Sin Partir</option>
<option value="proceso">En Proceso</option>
<option value="completada">Completada</option>
<option value="diferida">Diferida</option>
<option value="pendiente">Pendiente</option>
</select>
</td>
</tr>
<tr>
<td >Fecha Termino :</td>
<td><input class="seleccion" type="text" name="termino" size="20" ONBLUR="claves.termino.value=claves.termino.value.toUpperCase()"</td>
<td>Nombre contacto :</td>
<td><input class="seleccion" type="text" name="contacto" size="20" ONBLUR="claves.contacto.value=claves.contacto.value.toUpperCase()"</td>
</tr>

<tr>
<td >Fecha Inicio:</td>
<td><input class="seleccion" type="text" name="inicio" size="20" ONBLUR="claves.inicio.value=claves.inicio.value.toUpperCase()"></td>


</tr>
<tr>
<td >Fecha de Termino:</td>
<td><input class="seleccion" type="text" name="termino" size="20" ONBLUR="claves.termino.value=claves.termino.value.toUpperCase()"</td>
<td>Prioridad :</td>
<td>
<form name="tipo" method="post" action="datos_tarea.php.php">
<select name="tipo" size="1" class="seleccion">
<option value="sin_partir">Media</option>
<option value="proceso">Alta</option>
<option value="completada">Baja</option>
</select>
</td>
</tr>
<tr>
<td>Asignado A:</td>
<td><input class="seleccion" type="text" name="asignado" size="20" ONBLUR="claves.asignado.value=claves.asignado.value.toUpperCase()"></td>
<td><a href='javascript: cat_pieza()'> <input class="boton" align="center" type="SUBMIT" size="50" value="buscar"></a>
</td>
</tr>
</tbody>
</table>
<table>
</tbody>
<tr>
<td>Descripcion:</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>
<td><textarea name="descripcion" cols="50" rows="5" ONBLUR="claves.descripcion.value=claves.descripcion.value.toUpperCase()" > </textarea></td>
</tr>
</tbody>
</table>
</div>

<input class="boton" align="center" title style="WIDTH: 300px; HEIGHT: 24px" tabIndex="0" type="SUBMIT" value="Crear"></td>
</form>
</div>
</body>
</html>


CODIGO PHP

<?php

$link = mysql_connect("localhost", "root","");
mysql_select_db("cemco", $link);
if(! @mysql_select_db("cemco",$link))
{
echo "No se pudo conectar correctamente con la Base de datos";
exit();
}
$result=mysql_query("select * from nom_piezas",$link);

while($row = mysql_fetch_array($result,MYSQL_ASSOC))
{

$nombre_pieza[]=$row;

}
?>

<html>
<head>
<script language='javascript'>
function seleccionar(codigo)
{
formulario = opener.document.getElementById('nombre_pieza');
formulario.nombre_pieza.value = codigo;
close();
}
</script>
</head>

<body>
<table border='1' cellspacing='0' cellpadding='4'>
<?php
foreach ($nombre_pieza as $codigo => $nombre)
{

print ("<tr>\n");
print (" <td><a href='javascript: seleccionar(\"$nombre[nombre]\")'>$nombre[nombre]</a></td>\n");
print ("</tr>\n");
}
?>
</table>
</body>
</html>
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: Spanish All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP