buenas a todos,
mi problema es el siguiente
tengo un formulario simple
Código HTML:
<form id="formNuevoBoletin" method="post" action="includes/processNew.php" enctype="multipart/form-data" >
<label>Titulo del Boletin:</label></td>
<input type="text" name="titulo"></td>
<label>Selecciona el Archivo:</label></td>
<input type="file" name="archivo"></td>
<input type="hidden" name="tipo" value="<?php echo $tipo ?>">
<input type="button" onclick="subir('boletin')" value="Subir"></td>
</form>
ahora al momento de pasar por la funcion .... el error illegal invocation
el script es este
Código:
function subir(tipo){
if (tipo=="boletin"){
var formData = new FormData("#formNuevoBoletin");
$.ajax({
url: 'includes/processNew.php',
type: 'POST',
async: true,
data: formData,
success: function (response) {
$("#respuesta").html(response);
}
});
};
}
me imagino que el problema es con el form data, de echo es la primera vez que lo ocupo y me quede estancado en esto ...
espero su ayuda gracias :D