Ver Mensaje Individual
  #3 (permalink)  
Antiguo 12/02/2008, 00:45
R00110
 
Fecha de Ingreso: febrero-2008
Mensajes: 4
Antigüedad: 17 años, 1 mes
Puntos: 0
Re: Modificar diseño de input type=file... me funciona en firefox, pero no en IE xD j

He cambiado lo de HTMLElement y pues sigue funcionando en Firefox pero no en IE...

Código:
<html>

<head>
  <style>
  .tunedtextbox{
    border:0;
    background-color:transparent;
    background-image:url('http://img85.imageshack.us/img85/7228/boxbkgrhn4.gif');
    background-repeat:no-repeat;
    color:white;
  }
  .pathfield{
    position:absolute;
    top:0px;
    left:0px;
    width:153px;
    height:30px;
  }
  .filetextbox{
    position:absolute;
    top:5px;
    left:5px;
  }
  .filefield{
    position:absolute;
    top:5px;
    left:5px;
    width:243px;
    height:20px;
  }
  .searchbutton{
    position:absolute;
    top:0px;
    left:148px;
  }
  .fileinput{
    position:absolute;
    top:0px;
    left:0px;
    -moz-opacity:0;
    filter:alpha(opacity: 0);
  }
  #fileform1{
    position:absolute;
    top:50px;
    left:100px;
  }
  </style>
  <script type='text/javascript'>
    function copyvalue(target,source){
      document.getElementById(target).value=document.getElementById(source).value;
    }
  </script>
</head>

<body>
  <form>
    <div class="atorigin allsize" id="fileform1">
      <div class="filefield">
        <img class="searchbutton" src="http://img158.imageshack.us/img158/7820/fakebuscarzo3.jpg"/>
        <div class="fileinput">
          <input type="file" id="file" name="file" onclick="copyvalue('pathbox','file')"/>
        </div>
      </div>
      <div class="pathfield"> 
        <input class="tunedtextbox filetextbox" id="pathbox" name="pathbox" type="text" onchange="copyvalue('file','pathbox')"/>
      </div>
    </div>
  </form>

  <font style="color:red;" onClick="alert(document.getElementById('file').value);">Haz click aquí para ver el contenido del File 

Input!!</font>
</body>

</html>