I have the following code to initialize the Ajax Upload settings in my js:
new AjaxUpload($('.btnAdjuntar'), {
action: '/_layouts/Company.PortalFFVV.SharePoint.WebParts/Handlers/UploadFile.ashx',
onSubmit: function (file, ext) {
if (!(ext && /^(jpg)|(png)|(gif)|(pdf)|(txt)|(avi)$/i.test(ext))) {
showPopup('Solo se permite archivos de tipo images, audio , video , PDF y text. (Extensiones permitidas: jpg, png, gif, pdf, txt, avi).');
return false;
}
this.setData({ 'accion': 'A', 'fileName': AdminArchivoExterno.filename, 'maxFileSize': DatosConsultaSession.TamanioAdjuntoMailing })
showNofication("Espere un momento mientras se carga el archivo seleccionado...", "btnAdjuntar");
},
onComplete: function (file, response) {
removeNofication(strStickyNotificationID, classButtonNotificaction);
var resultado = new Array();
resultado = response.split("%#%");
if (resultado[0] == "True") {
$('.txtDirectorioDatos').val(file);
$('#divgvAdjuntos').html(resultado[2]);
}
else {
$('.txtDirectorioDatos').val('');
AdminArchivoExterno.filename = "";
showPopup(resultado[1])
return false;
}
CantidadAdjuntos = resultado[3];
}
});
So the problem is that when I click the attach file button ('.btnAdjuntar') nothing happens. But it works fine in IE and Chrome.
The Attach button file is in a jquery modal.
I'm working with web parts (the js belongs to a web part) which are placed in a sharepoint page (im using vs 2012).
If you guys need more info, let me know. Thanks
Ajaxupload creates a div and then the input file control inside it. The z-index that it sets for the div is somehow too high for Firefox. Find the _createInput function in the plugin where it sets the z-index for the div. Change it to a lower value and retry. The number that worked for me was 2147483