Using AJAX in Drupal 7 to change a form action I would like to update the Drupal save_edit module to add an auto-save feature. This would look similar to the Stack Exchange auto-save (draft saved). So far I've gotten the save portion working (saving the new node) but when I save again, it creates another node (this is not a surprise since I've not told it to do anything else).

I'm looking for how to tell the form that the node has already been saved and what the node id is.

I think I need to update the form action to point to /node/$nid/edit this way when the user clicks on the normal submit button, the node will be published (if set to).

Obviously I'm not wanting to refresh the page after these saves, that would be too easy ;-)
For more examples, here is the link to Lullabot's jQuery and JavaScript in Drupal video tutorial source files. I would pay attention to the Drupal 7 quickview.module example.

Here they use a page callback that passes either 'nojs' or 'ajax' as the second argument. The Drupal ajax framework will change the links on the page from 'node/[id]/nojs' to 'node/[id]/ajax' if the client has ajax enabled. The page callback function tests for the presence of ajax. If not, it will use drupal_goto() to gracefully degrade and reload the page. Or, if the ajax framework changed the link to ajax it will construct the HTML can send it back to the page with json headers and all using the new command() to manipulate markup, javascript Drupal setting, or CSS on the page.

I image with a tweaking this same technique can be used for Form API.