I have a series of jquery tabs that have forms with text fields inside each tab. One of them for example is a form that allows you to change your password. When I submit the form, I do so with a hidden field so that the same page just reloads and the value of that hidden field determines which php script to run at the top of the page.
My problem is that when the page reloads, it always returns to the first tab rather than the tab with the form I submitted. This is causing me a problem because my error messages are also inside the tabs with their respective forms, so for example if I submit the change password form inside tab3 and an error message fires inside tab3 because the user mistyped their existing password, the user won't see it because when he page reloads they see tab0 again. If they were to select tab3 again after the reload they would see the error message, but why would they do that if they think they just successfully changed their password and they didn't know an error message fired?
So anyway, I need my script to call the tab I was in before the page reloaded. I'm sure its something simple like using a post variable but I haven't yet learned how to pass variables between pages in jquery. So if you could help me out and hook up my script, I'd appreciate it. I'm just using the standard tabs script below.