in reply to Building an ajax form that degrades gracefully

<form action="serverside.cgi" onsubmit="return myAjax()">

Along with a regular: <input type="submit">

Have the JavaScript function myAjax return false should it execute successfully - this will cancel the regular form submission. Otherwise return true (or let it die) and the form submission will proceed as normal.