Reputation: 117
I have the next code:
submitAccionesDocs: function (typ) {
if (typ == "descargazip") {
var array = $("#accionesDocumentos").attr('action');
var actionCorrect = array.split("?")[0];
var actionNew = actionCorrect + "?type=" + typ;
$("#accionesDocumentos").attr('action', actionNew);
$("#accionesDocumentos").submit();
alert("submit");
$("#accionesDocumentos")[0].reset();
alert("clean");
$("#loadingimg").hide();
$("#loadingdiv").hide();
}
I debbug this with "ALERTS" and my problem is that in the function .submit(), this code does not work in IE8.
Attempt to replace that part by
$("#accionesDocumentos").submit(function (e) {
e.preventDefault();
});
and it did not work. Any need suggestions.
Upvotes: 0
Views: 536
Reputation: 4739
What version of jQuery are you using? The latest version (2.x) doesn't support IE8 or below.
An alternative, would be to use straight Javascript:
Change:
$("#accionesDocumentos").submit();
To:
document.getElementById("accionesDocumentos").submit();
Just a thought, assuming that this element is a form with a valid attributes.
Upvotes: 1