05/02/2008, 10:21
|
| | Fecha de Ingreso: enero-2008
Mensajes: 13
Antigüedad: 17 años Puntos: 0 | |
Re: problema en formulario con javascript hola. a continuación coloco el codigo completo, muchas gracias por la ayuda
Código:
?>
<script language="JavaScript" src="validator.js"></script>
<script language="JavaScript" src="calendar3.js"></script>
</head>
<body bottommargin="15" topmargin="15" leftmargin="15" rightmargin="15" marginheight="15" marginwidth="15" bgcolor="white">
<!-- Header -->
<!-- /Header -->
<!-- Body -->
<p> </p>
<table cellpadding="0" cellspacing="0" width="100%" border="0">
<tr>
<td height="21" class="header1"><div align="center">ORDEN DEL VEHICULO</div></td>
</tr>
<tr>
<!-- Content -->
<td valign="top" bgcolor="#FFFFFF"> <table cellpadding="3" cellspacing="1" border="0" width="100%">
<tr>
<td class="intd"><br>
<!-- Form -->
<form action="ingresar.php" method="post" name="registration" onsubmit="return v.exec()">
<table cellpadding="0" cellspacing="0" border="0" width="600" align="center">
<tr>
<td width="10" height="29" bgcolor="#4682B4"><img src="img/pixel.gif" width="11" height="8" border="0"></td>
<td class="header1" nowrap>Datos de la Orden<img src="img/pixel.gif" width="11" height="8" border="0"></td>
<td><img src="img/formtab_r.gif" width="10" height="0" border="0"></td>
<td background="img/line_t.gif" width="100%"></td>
<td background="img/line_t.gif"><img src="img/pixel.gif" width="10" height="1" border="0"></td>
</tr>
<tr>
<td height="247" background="img/line_l.gif"><img src="img/pixel.gif" border="0"></td>
<td colspan="3"> <img src="img/pixel.gif" width="1" height="10" border="0"> <br>
<div align="center" id="error_registration" style="display: block;"></div>
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td bgcolor="#DBEAF5"> <table cellspacing="1" cellpadding="2" border="0" width="97%">
<tr bgcolor="#ffffff">
<td id="Orden" width="121"><font face="Verdana, Arial, Helvetica, sans-serif">Numero
de la Orden:</font></td>
<td width="119"> <input type="text" name="NumOrden" size="5" class="ctrl"></td>
<td colspan="4" > </td>
</tr>
<tr bgcolor="#ffffff">
<td id="Ingreso"><font face="Verdana, Arial, Helvetica, sans-serif">Fecha
de Ingreso :</font></td>
<td colspan="2"><INPUT name=input9> <A href="javascript:cal9.popup();"><IMG height=13
alt="Click aqui para ingresar fecha de ingreso"
src="datagrid_class_4_2_0/images/blue/cal.gif" width=16
border=0></A> </td>
<td width="124" id="Salida"> <font face="Verdana, Arial, Helvetica, sans-serif">Fecha
de Salida:</font></td>
<td width="160"><INPUT name=input10> <A href="javascript:cal10.popup();"><IMG height=13
alt="Click aqui para ingresar fecha de salida"
src="datagrid_class_4_2_0/images/blue/cal.gif" width=16
border=0></A></td>
</tr>
<tr bgcolor="#4682B4">
<td height="25" colspan="6" nowrap id="t_street_address_ln2"><strong><font color="#FFFFFF" face="Verdana, Arial, Helvetica, sans-serif">DATOS
DEL PROPIETARIO</font></strong></td>
</tr>
<tr bgcolor="#ffffff">
<td height="26" id="Cliente"><font face="Verdana, Arial, Helvetica, sans-serif">Nombre</font></td>
<td height="26" colspan="3" id="NomCliente"><select name="Propietario" id="select1" onChange="ComponerLista(document.forms.frmDatos.cliente[selectedIndex].value);" onkeyup="descuento1();">
<option selected="selected" >------- Seleccione------
</option>>
<?php $tablaarticulo = mysql_query('SELECT * FROM cliente ORDER BY Cedula ASC');
while ($registroarticulo = mysql_fetch_array($tablaarticulo)) {
?>
<option value="<?php echo $registroarticulo['Cedula'];?>">
<?php echo $registroarticulo['Nombre']; ?></option>
<?php
}
mysql_free_result($tablaarticulo);?>
</select></td>
<td colspan="2"></td>
</tr>
<tr bgcolor="#4682B4">
<td height="25" colspan="6" id="t_country"> <font color="#FFFFFF"><strong>DATOS
DEL VEHICULO </strong></font></td>
</tr>
<tr bgcolor="#ffffff">
<td bgcolor="#ffffff" id="Placa Vehiculo">Placa:</td>
<td colspan="2" bgcolor="#ffffff" id="Placa Vehiculo"><select name="vehi" id="select1" onChange="ComponerLista(document.forms.frmDatos.cliente[selectedIndex].value);" onkeyup="descuento1();">
<option selected="selected" >-- Seleccione--
</option>>
<?php $tabla = mysql_query('SELECT * FROM vehiculo ORDER BY Placa ASC');
while ($registro = mysql_fetch_array($tabla)) {
?>
<option value="<?php echo $registro['Placa'];?>">
<?php echo $registro['Placa']; ?></option>
<?php
}
mysql_free_result($tabla);?>
</select></td>
<td colspan="3" bgcolor="#ffffff"></td>
</tr>
<tr bgcolor="#ffffff">
<td height="22" id="Descripcion_Vehiculo">Vehiculo:</td>
<td height="22" colspan="5" id="Descripcion_Vehiculo"><input type="text" name="Descripcion" size="35" class="ctrl"></td>
</tr>
</table>
</td>
</tr>
</table>
<img src="img/pixel.gif" width="1" height="10" border="0"><br>
</td>
<td background="img/line_r.gif"><img src="img/pixel.gif" border="0"></td>
</tr>
<tr>
<td width="10"><img src="img/formtab_b.gif" width="10" height="20" border="0"></td>
<td bgcolor="#4682B4" colspan="4" align="right"> <table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="btn" width="100"><input type="reset" name="Reset" value="Borrar" class="btnform"></td>
<td width="1"><img src="img/pixel.gif" width="1" height="18" border="0"></td>
<td class="btn" width="100"><input type="submit" name="Submit" value="Guardar" class="btnform"></td>
<td width="1"><img src="img/pixel.gif" width="1" height="18" border="0"></td>
</tr>
</table></td>
</tr>
</table>
</form>
<br></td>
</tr>
</table></td>
</tr>
</table>
</td></tr></table>
<SCRIPT language=JavaScript>
var cal9 = new calendar3(document.forms['registration'].elements['input9']);
cal9.year_scroll = true;
cal9.time_comp = false;
var cal10 = new calendar3(document.forms['registration'].elements['input10']);
cal10.year_scroll = true;
cal10.time_comp = false;
</SCRIPT>
<script language=JavaScript>
// form fields description structure
var a_fields = {
'NumOrden':{'l':'Numero de Orden','r':true,'f':'unsigned','t':'Orden'},
'input9':{'l':'Fecha de Ingreso','r':true,'f':'date','t':'Ingreso'},
'input10':{'l':'Fecha de Salida','r':true,'f':'date','t':'Salida'},
'Propietario':{'l':'Nombre','r':true,'f':'alph','t':'NomCliente'},
},
o_config = {
'to_disable' : ['Submit', 'Reset'],
'alert' : 1
}
// validator constructor call
var v = new validator('registration', a_fields, o_config);
</script>
</body>
</html>
|