I am trying to run code when a form is submitted. Here is my code:
Code:<script type="text/javascript">$(document).ready(function(){$('#fileUpload').submit(function () { alert('ok');});});The alert seems to work before the function, so the problem seems like I can't get the jQuery function to run when submitting the form.Code:<a class="button small red" href="#" onclick="document.forms['fileUpload'].submit();"><span>Submit</span></a >


Reply With Quote
Bookmarks