jquery tabs with form submit

jquery tabs with form submit

I'm using jquery tabs for navigation.  I'm able to successfully load the selected tabs and also open links in the current tab instead of leaving the page - until I do a form submission.  When the user submits the form, it calls a php script to save the form data to the database.  After that runs successfully, how and where do you then set which tab is to be active and what content is to be loaded in the panel?  For example within the Contacts tab, the user submits the new_contact.php form which then calls save_contact.php to save the form values to the database.  After that I want the Contacts tab to still be the active tab and I want the panel content to be update_contact.php?id=$ID which loads the newly saved contact record to view/update.  Thanks for any help.