Ver Mensaje Individual
  #3 (permalink)  
Antiguo 23/03/2008, 12:23
guelu
 
Fecha de Ingreso: agosto-2006
Mensajes: 40
Antigüedad: 18 años, 5 meses
Puntos: 0
Re: Funciona con Firefox y no con explore!!!

Hola que tal;

El archivo upload3.php se inicia al darle a un boton submit de otro archivo como te habrás imaginado. te pongo el código del formulario que lo dispara.
Código:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0014)about:internet -->
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<title>Registro de objetos</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script language="JavaScript" type="text/javascript">
function validar(registro)
{

  if (registro.nombreobj.value.length < 3)
  {
    alert("Escriba por lo menos 3 caracteres en el campo \"Nombre\".");
    registro.nombreobj.focus();
    return (false);
  }
  

 if (registro.interes.value.length < 4)
  {
    alert("Escriba sus preferencias en el campo \"Me interesa\".");
    registro.interes.focus();
    return (false);
  }
  
   if (registro.descripcion.value.length < 4)
  {
    alert("Escriba una breve descripción del objeeto en\"Descripción\".");
    registro.descripcion.focus();
    return (false);
  }
  
   if (registro.foto.value.length < 4)
  {
    alert("Es imprescindible que inserte una foto del objeto");
    registro.foto.focus();
    return (false);
  }
  
   return (true);
}
  </script>
</head>

<body>
<table width="668" border="0" cellpadding="0" cellspacing="0">
  <!--DWLayoutTable-->
  
  <tr>
    <td width="112" height="25">&nbsp;</td>
    <td width="401">&nbsp;</td>
    <td width="155">&nbsp;</td>
  </tr>
  <tr>
    <td height="24" colspan="3" valign="top"><img src="img/cabecerainsertarobj.jpg" width="668" height="24" /></td>
  </tr>
  <tr>
    <td height="17"></td>
    <td></td>
    <td></td>
  </tr>
  <tr>
    <td height="514"></td>
    <td valign="top"><table width="401" border="0" cellpadding="0" cellspacing="0">
      <!--DWLayoutTable-->
      <tr>
        <td width="401" height="76" valign="top" class="Estilo1"><div align="justify">Todos los campos que aparecen son obligatorios. Hemos querido crear una aplicación de registro de objetos lo más sencilla posible y a la vez con una eficacia óptima. </div></td>
    </tr>
      <tr>
        <td height="438" valign="top"><table width="401" border="0" cellpadding="0" cellspacing="0">
          <!--DWLayoutTable-->
          <form name ="registro" action="funciones/upload3.php" method="post" enctype="multipart/form-data" onSubmit="return validar(registro)">
            <tr>
              
              <td colspan="2" rowspan="3" valign="top" class="Estilo1"><p>Nombre del Objeto:</p>
              <p>Se puede clasificar dentro de:</p>            <p>Descripción:  </p></td>
		                      
          <td height="34" colspan="2" align="right"  valign="top"><label>
            
            <input name="nombreobj" type="text" class="Estilo2"  style="width:125px;" maxlength="40"/>
            </label></td>
              <td width="65">&nbsp;</td>
            </tr>
            
            <tr>
              <td height="22" colspan="2" align="right"  valign="top"><label>
                <select name="tipo" class="Estilo2" style="width:125px;">
                  <option value="Informática">Informática</option>
                  <option value="Electrodomésticos">Electrodomésticos</option>
                  <option value="Ropa">Ropa</option>
                  <option value="Libros">Libros</option>
                  <option value="Motor">Motor</option>
                  <option value="Mobiliario">Mobiliario</option>
                  <option value="Papelería">Papelería</option>
                  <option value="Fotografía">Fotografía</option>
                  <option value="Deportes">Deportes</option>
                  <option value="Coleccionismo">Coleccionismo</option>
                  <option value="Otros">Otros</option>
                  </select>
                </label></td>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <td width="41" height="39">&nbsp;</td>
              <td width="84">&nbsp;</td>
              <td>&nbsp;</td>
            </tr>
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            <tr>
              <td height="115" colspan="4" align="right" valign="top"><label>
                <TEXTAREA name="descripcion" COLS=60 ROWS=7 class="Estilo2" onkeydown="if(this.value.length >= 400){ alert('Has superado el tamaño máximo permitido (400 caracteres)'); }">Max. 400 caracteres!</textarea>
                
                
                </label></td>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <td width="138" height="13"></td>
              <td width="88"></td>
              <td></td>
              <td></td>
              <td></td>
            </tr>
            
            
            
            
            
            
            
            <tr>
              <td height="28" valign="top" class="Estilo1">Inserte una foto:</td>
              <td colspan="3" align="right" valign="top" class="Estilo2"><label>
                <input type="file" name="foto" class="Estilo2">
                </label></td>
              <td>&nbsp;</td>
            <tr><td height="13"></td>
              <td colspan="3" rowspan="2" align="right" valign="middle" class="Estilo2"><label>
                <input name="interes" type="text" class="Estilo2" style="width:195px" value="Máx 40 caracteres!" maxlength="40"  />
                </label></td>
              <td></td>
            <tr>
              <td height="25" valign="top" class="Estilo1">*Me interesan: </td>
              <td></td>
            <tr>
              <td height="38"></td>
              <td></td>
              <td>&nbsp;</td>
              <td align="right" valign="middle"> <input name="submit" type="submit" class="Estilo2" value="Subir Objeto!" /> <input name="action" type="hidden" value="upload" /></td>
              <td>&nbsp;</td>
            <tr>
              <td height="22"></td>
              <td></td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
            <tr>
              <td height="76" colspan="5" valign="top" class="Estilo1"><div align="justify">(*) Les recomendamos que completen este campo con unas pocas palabras que describan el tipo de objeto por el que les gustaría intercambiar el que ofrecen. Ej1: Producto similar; Ej2:Material informático </div></td>
            <tr>
              <td height="13"></td>
              <td></td>
              <td></td>
              <td></td>
              <td></td>
          </form>
        </table></td>
    </tr>
    </table>
    </td>
    <td></td>
  </tr>
  <tr>
    <td height="2"></td>
    <td></td>
    <td></td>
  </tr>
</table>
</body>
</html>