I'm debugging some JavaScript and I have a submit button that should run a jquery function to run a script via Ajax. When I click the button, an error is displayed in the Firebug console but I don't have time to read it before the form is submitted and thus the page is reloaded.