<?php include "../ReglasNegocio/tipo_obra.php"; $tipo_obra = new tipo_obra(); $editar = $_GET["editar"]; $boton = "verifica()"; if (!empty($editar)) { $nombre_tipo_obra = $tipo_obra->Select($editar); $row = mysql_fetch_array($nombre_tipo_obra); $codigo_tipo_obra = $row['CODIGO_TIPO_OBRA']; $nombre_tipo_obra = $row['NOMBRE_TIPO_OBRA']; $boton = "VerificaUpdate()"; } //$nombre_direccion = "Hola"; ?> <script LANGUAGE="JavaScript"> function verifica() { if (document.form.codigo_tipo_obra.value.length==0) { alert("Debe ingresar un Codigo"); document.form.codigo_tipo_obra.focus(); return 0; } if (document.form.nombre_tipo_obra.value.length==0) { alert("Debe ingresar un Nombre"); document.form.nombre_tipo_obra.focus(); return 0; }