![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
06/04/2006, 18:19
|
| | Fecha de Ingreso: noviembre-2004
Mensajes: 181
Antigüedad: 20 años, 3 meses Puntos: 1 | |
holas amigos trate de hacerlo pero no me fuciono no se si habra algo malo?
bueno en el boton le agregue la funcion onclick q valide y si el num es 0 deveria embiar la ventana pero no lo hace??
// asi tengo el boton
echo " <td bgcolor='#FFFFCC'><input type='submit' value='Ingresar' name='btningresar' onclick='validar()'></td>\n";
funcion validar
<SCRIPT LANGUAGE="javascript">
function validar()
{
var variable = <?php $num?>;// variable de php asignada para verificar si esta bn iniciada la cession ;
if(variable = 0 )
{
if(confirm('ingreso mal los datos'))
{
alert("ingrese denuevo")
document.form.submit();
}
}
}
</script>
gracias |