<script>
//***** variable global
var i=1;
function fEscribeDir()
{
addFormField(document.formu1,'file','fichero'+i);
document.formu1.numficheros.value=i;
i=i+1;
}
function addFormField (form, fieldType, fieldName, fieldValue)
{
  if (document.getElementById)
    {
     var input = document.createElement('INPUT');
     var div = document.createElement('DIV');
    
     if (document.all)
      { // what follows should work 
                          // with NN6 but doesn't in M14
        input.type = fieldType;
        input.name = fieldName;
        input.value = fieldValue;
      }
     else if (document.getElementById)
      { // so here is the
                                          // NN6 workaround
        input.setAttribute('type', fieldType);
        input.setAttribute('name', fieldName);
        input.setAttribute('value', fieldValue);
      }
    
      input.style.width="320px";
      div.appendChild(input);
      document.getElementById('ficheros').appendChild(div);
   }
}
</script>
<form name="FrmUpload">
      <div id="ficheros" style="position: absolute; top: <?echo ($top+($salto*7));?>px; left: 40px; width: 340px; height: 90px; overflow: auto;">
        <input type="button" name="boton" id="boton" value="Añadir otro fichero" onclick="javascript: fEscribeDir();">
        <br>
        <input type="file" name="fichero0" style="width: 320px;">
        
      </div>
</form>
jueves, 31 de enero de 2008
Suscribirse a:
Enviar comentarios (Atom)
Archivo del blog
- 
        ► 
      
2014
(13)
- ► septiembre (2)
 
 
- 
        ▼ 
      
2008
(13)
- ► septiembre (2)
 
 
1 comentario:
huy me ayudo resto tu codigo muhcas gracias
Juan Ricardo
Publicar un comentario