Foros del Web » Programando para Internet » Javascript »

Problema con menus en pagina.

Estas en el tema de Problema con menus en pagina. en el foro de Javascript en Foros del Web. Hola salu2 foreros. bien tengo un problemita, la vdd acabo de comenzar a usar java apenas hace como 2 semanas y pues todavia no entiendo ...
  #1 (permalink)  
Antiguo 06/02/2008, 10:47
Avatar de lobonegro6  
Fecha de Ingreso: enero-2005
Ubicación: Monterrey, México.
Mensajes: 145
Antigüedad: 19 años, 4 meses
Puntos: 1
Problema con menus en pagina.

Hola salu2 foreros.

bien tengo un problemita, la vdd acabo de comenzar a usar java apenas hace como 2 semanas y pues todavia no entiendo bien algunos puntos.

el problema es el siguiente; tengo un pagina en donde utilizo varios menus java, a su vez esta pagina es la de procesa de un php x lo cual es divida en 3 partes por un switch, y aqui viene el problema, en 2 de los pasos no necesito los menus de java y entonces cuando caigo a cualquiera de esos 2 pasos la pagina me manda un error muy molesto q dice asi:
Calendar.setup:
Nothing to setup (no fields found). Please check your code y el boton de OK

alguien me puede sugerir algo para dejar de mostrar esto hice un if pero no lo elimina. cualquier ayuda gracias.

Código PHP:
<!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>
<link rel="stylesheet" type="text/css" href="style.css" />
<link rel="stylesheet" type="text/css" href="./js/calendar/calendar-win2k-1.css" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Edicion de Reporte</title>
<script src="./js/calendar/calendar.js" type="text/javascript"></script>
<script type="text/javascript" src="./js/calendar/lang/calendar-es.js"></script>
<script type="text/javascript" src="./js/calendar/calendar-setup.js"></script>
</head>
<body>
<?php include ("leftmenu.php"); ?>
<?php 
include("conexion.php");

$reporte=$_GET['especificacion'];
$delimplode=$_GET['seleccion'];
$accion=$_GET['accion'];

switch (
$accion) {
    case 
"Filtrar":
    
$fechai=$_GET['txtFechaInicio'];
$fechaf=$_GET['txtFechaFin'];
$p_toquest=$_GET['p_toquest'];

?>

<div id="content">
    <div id="overAll"></div>
        <div id="divMessage" onclick="showWindow('divMessage', false);">
                <div id="body_content">
            <div id="page_title"><a onclick="showWindow('divMessage', true);"></a>Busqueda con filtro</div>
                <div id="breads"><a href="esp_captura.php">Agregar</a>
                    <?php include ("esp_fechas.php"); ?><br />
                    <?php include ("filtro_1.php"); ?>
                    </div>
                    
                    <?php                                    
                    
echo "<form action='esp_editar1.php' method='get'>";
                    echo 
"<table class='list'>";
                    echo 
"<tr>";
                    echo 
"<th width='5%' scope='col'>Eliminar</th>";
                    echo 
"<th width='17%' scope='col'><a href='esp_listado.php?eleccion=".xespecificacion."'>Especificaciones</a></th>";
                    echo 
"<th width='22%' scope='col'>Descripcion</th>";
                    echo 
"<th width='36%' scope='col'><a href='esp_listado.php?eleccion=".xr_progress."'>R. Progress</th>";
                    echo 
"<th width='20%' scope='col'>Fecha Recepcion</th>";
                    echo 
"</tr>";
                                
                            include (
"conexion.php");
                            
mysql_error();

//$consulta = "SELECT * FROM especificaciones JOIN desarrolladores WHERE especificaciones.r_progress = desarrolladores.id_desarrolladores AND especificaciones.r_progress = '$p_toquest' AND especificaciones.recepcion >= '$fechai' AND especificaciones.envio <= '$fechaf'";
    
$consulta "SELECT * FROM especificaciones JOIN desarrolladores WHERE especificaciones.r_progress = desarrolladores.id_desarrolladores ";
    if (
$p_toquest == "Todos") { } else { $consulta.="AND especificaciones.r_progress = '$p_toquest' "; } $consulta.="AND especificaciones.recepcion >= '$fechai' AND especificaciones.recepcion <= '$fechaf'";
//    $consulta = "SELECT * FROM especificaciones WHERE recepcion >= '$fechai' AND envio <= '$fechaf'";
    
$resultado mysql_query($consulta);
        
        if(!
$resultado) {
            
$message  'Query invalido: ' mysql_error() . "\n";
            
$message .= 'Query completo: ' $resultado;
        die(
$message);
        }

        while (
$renglon mysql_fetch_assoc($resultado)) {
        echo 
mysql_error();
echo 
"<tr>";
echo 
"<tr onmouseover=\"this.className='thover'\"; onmouseout=\"this.className='tno'\";>";
echo 
"<td> <input type=\"checkbox\" name=\"seleccion[]\" value=\"".$renglon['id_especificaciones']."\"><br></td>";
echo 
"<td><a href='esp_editar.php?especificacion=".$renglon['especificacion']."'>$renglon[especificacion]</a></td>";
echo 
"<td><a href='esp_editar.php?especificacion=".$renglon['especificacion']."'>$renglon[descripcion]</a></td>";
echo 
"<td><a href='esp_editar.php?especificacion=".$renglon['especificacion']."'>$renglon[desarrolladores]</a></td>";
echo 
"<td><a href='esp_editar.php?especificacion=".$renglon['especificacion']."'>$renglon[recepcion]</a></td>";
echo 
"</tr>\n";
        }        
  
?>
                    </table>
                    <input type="hidden" name="id_especificacion" value="<? echo $renglon['especificacion']; ?>"> 
                    <input type="submit" name="accion" value="Borrar">
                    </form>
            </div>
    </div>
</div>

<?php
// } else {
// echo "faltan datos para la busqueda";
//} 

    
break;
    case 
"Borrar":
        
                        break;
                        default:
                                            
        
?>
        
<div id="content">
    <div id="overAll"></div>
        <div id="divMessage" onclick="showWindow('divMessage', false);">
                <div id="body_content">
            <div id="page_title"><a onclick="showWindow('divMessage', true);"></a>Edicion de Especificaciones</div>
                <div id="breads"><a href="esp_captura.php">Agregar</a><?php include ("esp_fechas.php"); ?></div>
                    <form action="esp_editando.php" method="post" />
                    <table class="list">

    <tr>
      <td width="39%">Especificacion:</td>
      <td width="61%">
      <input type="text" name="especificacion" id="especificacion" value="<? echo $fila_reporte['especificacion']; ?>" size="40" /></td>
      <td width="61%">&nbsp;</td>
    </tr>
    <tr>
      <td>Descripcion:</td>
      <td><input type="text" name="descripcion" id="descripcion" value="<? echo $fila_reporte['descripcion']; ?>" size="40" /></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>Tipo:</td>
      <td><div align="left"><?php
        
echo "<select name='tipo'>.$campotipo.</select>";
      
?>
     </div></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>R. Progress:</td>
        <td><div align="left"><?php
        
echo "<select name='r_progress'>.$campodes.</select>";
//        echo "$campodes";
//        echo "</select>";
//        <select name="r_progress" /> echo "$campodes";</select>
        
?>

        </div></td>
        <td>&nbsp;</td>
    </tr>
    <tr>    
      <td>R. HD:</td>
        <td><div align="left"><?php
        
echo "<select name='r_hd'>.$campoclient.</select>"
        
?>
        </div></td>
        <td>&nbsp;</td>
    </tr>
    <tr>
      <td>Recepcion:</td>
      <td><input name="recepcion" type="text" id="recepcion" value="<? echo $fila_reporte['recepcion']; ?>" size="40" />      </td>
      <td><img src="images/iCalendar.gif" id="boton_01" /></td>
    </tr>
    <tr>
      <td>Envio:</td>
      <td><input name="envio" type="text" id="envio" value="<? echo $fila_reporte['envio']; ?>" size="40" />      </td>
      <td><img src="images/iCalendar.gif" id="boton_02" /></td>
    </tr>
    <tr>
      <td>1er. Revision:</td>
      <td><input name="revision1" type="text" id="revision1" value="<? echo $fila_reporte['revision1']; ?>" size="40" />      </td>
      <td><img src="images/iCalendar.gif" id="boton_03" /></td>
    </tr>
    <tr>
      <td>Envio 1er. Revision:</span></td>
      <td><input name="envio_revision_1" type="text" id="envio_revision_1" value="<? echo $fila_reporte['envio_revision_1']; ?>" size="40" />      </td>
      <td><img src="images/iCalendar.gif" id="boton_04" /></td>
    </tr>
    <tr>
      <td>Recep. de Adecuacion:</span></td>
      <td><input name="rec_adec" type="text" id="rec_adec" value="<? echo $fila_reporte['rec_adec']; ?>" size="40" />      </td>
      <td><img src="images/iCalendar.gif" id="boton_05" /></td>
    </tr>
    <tr>
      <td>Envio de Adecuacion:</td>
      <td><input name="envio_adec" type="text" id="envio_adec" value="<? echo $fila_reporte['envio_adec']; ?>" size="40" /></td>
      <td><img src="images/iCalendar.gif" id="boton_06" /></td>
    </tr>
    <tr>
      <td>Estimado:</td>
      <td><input type="text" name="estimado" value="<? echo $fila_reporte['estimado']; ?>" size="40" /></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>Real:</td>
      <td><input type="text" name="demora_real" value="<? echo $fila_reporte['demora_real']; ?>" size="40"  /></td>
      <td>&nbsp;</td>
    </tr>    
    <tr>
      <td>&nbsp;</td>
      <td><div align="right">
      <input type="hidden" name="id_especificaciones" value="<? echo $fila_reporte['id_especificaciones']; ?>">
        <input type="submit" name="modifica" value="Modificar" />
        <input type="submit" name="borra" value="Borrar" />
        <button type="reset" onclick = "window.location='esp_listado';">Cancelar</button>
      </div></td>
      <td>&nbsp;</td>
    </tr>
  </table>
</form>
<? ?>
<?php

if($accion==="Filtrar" OR $accion==="Borrar") { ?>
<script type="text/javascript">
Calendar.setup({
        inputField    : "recepcion",            // id del campo input
        ifFormat    : "%Y-%m-%d",        // formato del campo input
        button        : "boton_01",            // gatillo para el calendario (boton ID)
        align        : "Tr",            // aliniacion (defaults para B1)
        singleClick    : true,
        weekNumbers    : false
        });
        
Calendar.setup({
        inputField    : "envio",            // id del campo input
        ifFormat    : "%Y-%m-%d",        // formato del campo input
        button        : "boton_02",            // gatillo para el calendario (boton ID)
        align        : "Tr",            // aliniacion (defaults para B1)
        singleClick    : true,
        weekNumbers    : false
        });
        
Calendar.setup({
        inputField    : "revision1",            // id del campo input
        ifFormat    : "%Y-%m-%d",        // formato del campo input
        button        : "boton_03",            // gatillo para el calendario (boton ID)
        align        : "Tr",            // aliniacion (defaults para B1)
        singleClick    : true,
        weekNumbers    : false
        });
        
Calendar.setup({
        inputField    : "envio_revision_1",            // id del campo input
        ifFormat    : "%Y-%m-%d",        // formato del campo input
        button        : "boton_04",            // gatillo para el calendario (boton ID)
        align        : "Tr",            // aliniacion (defaults para B1)
        singleClick    : true,
        weekNumbers    : false
        });                

</script><?php
} else { } ?>

</body>
</html>

Última edición por lobonegro6; 06/02/2008 a las 10:53 Razón: olvido
  #2 (permalink)  
Antiguo 06/02/2008, 10:56
Avatar de JavierB
Colaborador
 
Fecha de Ingreso: febrero-2002
Ubicación: Madrid
Mensajes: 25.052
Antigüedad: 22 años, 3 meses
Puntos: 772
Re: Problema con menus en pagina.

Hola lobonegro6

Con tanto PHP es difícil saber donde está el error de JavaScript, debería poner el código que se genera.

Saludos,
  #3 (permalink)  
Antiguo 06/02/2008, 12:16
Avatar de lobonegro6  
Fecha de Ingreso: enero-2005
Ubicación: Monterrey, México.
Mensajes: 145
Antigüedad: 19 años, 4 meses
Puntos: 1
Re: Problema con menus en pagina.

ok gracias JavierB ya lo solucione muchas gracias de todos modos. modifique el if para q validara de otr a forma y me quedo
Código:
<?php

if($accion==="Filtrar" OR $accion==="Borrar") { } else { ?>
<script type="text/javascript">
Calendar.setup({
		inputField	: "recepcion",			// id del campo input
		ifFormat	: "%Y-%m-%d",		// formato del campo input
		button		: "boton_01",			// gatillo para el calendario (boton ID)
		align		: "Tr",			// aliniacion (defaults para B1)
		singleClick	: true,
		weekNumbers	: false
		});
		
Calendar.setup({
		inputField	: "envio",			// id del campo input
		ifFormat	: "%Y-%m-%d",		// formato del campo input
		button		: "boton_02",			// gatillo para el calendario (boton ID)
		align		: "Tr",			// aliniacion (defaults para B1)
		singleClick	: true,
		weekNumbers	: false
		});
		
Calendar.setup({
		inputField	: "revision1",			// id del campo input
		ifFormat	: "%Y-%m-%d",		// formato del campo input
		button		: "boton_03",			// gatillo para el calendario (boton ID)
		align		: "Tr",			// aliniacion (defaults para B1)
		singleClick	: true,
		weekNumbers	: false
		});
		
Calendar.setup({
		inputField	: "envio_revision_1",			// id del campo input
		ifFormat	: "%Y-%m-%d",		// formato del campo input
		button		: "boton_04",			// gatillo para el calendario (boton ID)
		align		: "Tr",			// aliniacion (defaults para B1)
		singleClick	: true,
		weekNumbers	: false
		});				
		
Calendar.setup({
		inputField	: "rec_adec",			// id del campo input
		ifFormat	: "%Y-%m-%d",		// formato del campo input
		button		: "boton_05",			// gatillo para el calendario (boton ID)
		align		: "Tr",			// aliniacion (defaults para B1)
		singleClick	: true,
		weekNumbers	: false
		});
		
Calendar.setup({
		inputField	: "envio_adec",			// id del campo input
		ifFormat	: "%Y-%m-%d",		// formato del campo input
		button		: "boton_06",			// gatillo para el calendario (boton ID)
		align		: "Tr",			// aliniacion (defaults para B1)
		singleClick	: true,
		weekNumbers	: false
		});		
</script><?php
} ?>
salu2
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 09:20.