Comunidad de diseño web y desarrollo en internet online

problemas con datepicker

Citar            
MensajeEscrito el 22 Abr 2010 02:48 pm
A alguien le ha salido este mensaje Error: inst is undefined y ocurre porque estoy utilizano varios formularios y cuando oculto el form que tiene el datepicker y luego regreso me sale ese mensaje y ojala alguien sepa po rque?

Aqui algo de codigo:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title></title>
<link href="css/estilo.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="archivos/js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="archivos/js/jquery-ui-1.7.2.custom.min.js"></script>
<script type="text/javascript">


function inicio(){
$('#txt_fecha').datepicker({ dateFormat: 'yy-mm-dd'});
//-------------------------
$("#btn_guardar").click(function(){
var ide=$('#txt_ide').attr('value');
var nombre=$('#txt_nombre').attr('value');
var genero=$("input[id='rb_sexo']:checked").attr('value');
var edad=$('#txt_edad').attr('value');
var resp=$('#sl_responsable').attr('value');
var fecha=$('#txt_fecha').attr('value');
var lugar=$('#sl_lugar').attr('value');
var actividad=$('#sl_actividad').attr('value');
if(edad.length<1)
edad=0;
$.ajax({
type: "POST",
url: 'archivos/act/guardar_inscritos.php',
data:'ide='+ide+'&nombre='+nombre+'&genero='+genero+'&edad='+edad+'&resp='+resp+'&fecha='+fecha+'&lugar='+lugar+'&actividad='+actividad,
success: function(data){
alert("Datos Guardados");

}
});
return false;
});
//-------------------------
function rep_semanal()
{ $('#frm_ciclorecreovias').hide();
$('#frm_asistentes').hide();
$.ajax({
type: "POST",
url: 'archivos/act/reportese.php',
success: function(datos){
$('#reportes').html(datos);

}
});
}
//-------------------------
function rep_mensual()
{
$('#frm_ciclorecreovias').hide();
$('#frm_asistentes').hide();
$.ajax({
type: "POST",
url: 'archivos/act/reporteme.php',
success: function(datos){
$('#reportes').html(datos);
}
});
}
//-------------------------
$('#link_asistentes').click(function(){
$('#reportes').html("");
$('#frm_asistentes').show();
return false;
});
//------------------------
$('#link_reportemen').click(function(){
rep_mensual();
return false;
});
//-----------------------
$('#link_reportesem').click(function(){
rep_semanal();
return false;
});
//-----------------------
}
</script>
<link href="archivos/js/jquery-ui-1.7.2.custom.css" rel="stylesheet" type="text/css" />
</head>
<body>
<script type="text/javascript">
inicio();
</script>
<?php
include('../conexion.php');
?>
<div id="menu1">
<a id="link_asistentes">Registro de Asistentes</a>
<a id="link_reportemen">Reporte Mensual</a>
<a id="link_reportesem">Reporte Semanal</a>
</div>
<div id="formularios">
<form id="frm_asistentes">
<p>Registro de Asistentes a Eventos que promueven la actividad f&iacute;sica. </p>
<p><label>Fecha:</label><input name="txt_fecha" id="txt_fecha" type="text" size="10"/></p>
<p><label>Lugar:</label><select name="sl_lugar" id="sl_lugar" size="1">
<?php
$conexion=conectar();
mysql_select_db("estd", $conexion) or die("No se pudo conectar con la base de datos");
$result=mysql_query("select codigo,nombre from lugares");
while($fila=mysql_fetch_array($result)) {
echo "<option value='".$fila['codigo']."'>".$fila['nombre']."</option>";
}
cerrar_conexion($conexion);
?>
</select></p>
<p><label>Responsable:</label>
<select name="sl_responsable" id="sl_responsable" size="1">
<?php
$conexion=conectar();
mysql_select_db("estd", $conexion) or die("No se pudo conectar con la base de datos");
$result=mysql_query("select identificacion,nombre from responsables");
while($fila=mysql_fetch_array($result)) {
echo "<option value='".$fila['identificacion']."'>".$fila['nombre']."</option>";
}
cerrar_conexion($conexion);
?>
</select></p>

<p><label>Actividad:</label>
<select name="sl_actividad" id="sl_actividad" size="1">
<?php
$conexion=conectar();
mysql_select_db("estd", $conexion) or die("No se pudo conectar con la base de datos");
$result=mysql_query("select codigo,nombre from actividades_prom");
while($fila=mysql_fetch_array($result)) {
echo "<option value='".$fila['codigo']."'>".$fila['nombre']."</option>";
}
cerrar_conexion($conexion);
?>
</select></p>

<p><label>Identificaci&oacute;n:</label><input name="txt_ide" id="txt_ide" type="text" size="10"/></p>
<p><label>Nombre:</label><input name="txt_nombre" id="txt_nombre" type="txt_nombre" size="10"/></p>
<p><label>Edad:</label><input name="txt_edad" id="txt_edad" type="txt_nombre" size="10"/></p>
<p><label>Sexo:</label>
<input name="rb_sexo" id="rb_sexo" type="radio" value="M" /><label>Masculino</label>
<input name="rb_sexo" id="rb_sexo" type="radio" value="F" /><label>Femenino</label></p>
<p><input type="submit" name="btn_guardar" id="btn_guardar" value="Grabar"/></p>
</form>
</div>
<div id="reportes">
</div>
</body>
</html>

Por sebastiancb

62 de clabLevel



 

firefox
Citar            
MensajeEscrito el 06 May 2010 04:14 pm
Este problema se arregla utilizando la última version de jquery..

Por sebastiancb

62 de clabLevel



 

firefox

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.