Bueno mi funcion addCampo se ha quedado asi
Código PHP:
function addCampo() {
//nDiv = document.createElement('div');
//nDiv.className = 'text3';
//nDiv.id = 'file' + (++numero);
nCampo = document.getElementById("adjuntos").firstChild.cloneNode(true);
nCampo.onchange = function() {if(this.value!=''){addCampo();}};
a = document.createElement('a');
a.setAttribute('class','text');
a.setAttribute('name',nDiv.id);
a.setAttribute('href','#');
a.className = 'text';
a.name = nDiv.id;
a.href = '#';
a.onclick = elimCamp;
a.innerHTML = '[x]';
// nDiv.appendChild(nCampo);
//nDiv.appendChild(a);
container = document.getElementById('adjuntos');
container.appendChild(nCampo);
container.appendChild(a);
//container.appendChild(nDiv);
}
He eliminado el contenedor que lo crea dinamicamante, para evitar tener problemas a la hora de controlar a los hijos y tal.
el codigo html se quedo asi:
Código:
<div id="adjuntos" class='text3' align='center'>
<input type='file' name='foto_inmueble[]' class='text3' onchange='addCampo();'>
</div>
Pero no afecto en nada al funcionamiento, tanto para ie como para mf.
el mf me devuelve el array como este :
Código HTML:
Array ( [foto_inmueble] => Array ( [name] => Array ( [0] => Ursula.jpg ) [type] => Array ( [0] => image/jpeg )....
Mientras que ir devuelve el que seria el correcto:
Código HTML:
Array ( [foto_inmueble] => Array ( [name] => Array ( [0] => tiburon martillo.jpg [1] => travesti.jpg [2] => Ursula.jpg [3] => up.gif [4] => Ursula.jpg [5] => ) [type] => Array ( [0] => image/pjpeg [1] => image/pjpeg [2] => image/pjpeg ....
Gracias por vuestro apoyo.