Hola veran tengo el siguiente codigo:
Código PHP:
<html>
<head>
<SCRIPT LANGUAGE="JavaScript">
function CrearBotones(Cant)
{
parseInt=(Cant);
if(!Cant) Cant=0;
alert(Cant);
for(Cont=1;Cont<=Cant;Cont++)
{
var b = document.createElement('input');
b.type = 'file';
b.value = 'Submit2';
b.name = 'Archivos[]';
document.body.appendChild(b);
//document.write("<br>");
}
//document.write("<input type='hidden' name='cant1' value='" + Cant + "'>");
return false;
}
</SCRIPT>
</head>
<body>
<form action="SubirArchivo.php" method="post" enctype="multipart/form-data" name="Form">
Cantidad:
<select name="CantFiles">
<script type="text/javascript">
for(x=1;x<=10;x++)
{
document.write("<option value="+ x +">"+ x+"</option>");
}
</script>
</select>
<input type="submit" name="Submit" value="Crear" onclick="return CrearBotones(document.Form.CantFiles.value);"/><br>
</form>
</body>
</html>
El cual el objetivo es darle la posibilidad al usuario de subir varios archivos a un servidor remoto (Maximos 10), pero a pesar de que cuando llamo al script de la sig. manera
Código PHP:
onclick="return CrearBotones(document.Form.CantFiles.value);"
La pagina se recarga y no genera los botones que deseo aun cuando en el script al final le pongo return false, mi objetivo es generar dichos botones sin tener que cargar nuevamente la pagina.
Cualquier duda o sugerencia se agradece mucho