Im trying to display a loading gif before submitting a multipart-form (file upload), this is my code.. but the image is not displaying.. if i remove the submit() it displays, so.. is not a path or syntax problem.
$('#btnSubmit').click(function() {
document.getElementById('loader').innerHTML = "<img src='<?= url::base() ?>themes/img/loading.gif' border='0' />";
$('#uploadform').submit();
});
$(‘#loader’).html = “themes/img/loading.gif’ border=’0′ />”;
This will insert the loading image properly, although unless you are telling jQuery to submit the form with $.post, then you will be taken to a new submit page so you won’t see the image anyway.