I got some old javascript tab system and I’m trying to rewrite it to
make use of window.location.hash to set proper tab after the page is
loaded. It more or less works, but the main problem is that I got some
forms and I don’t know how to set their url correctly, so that after
the form is sent, proper tab is opened again.
I got some old javascript tab system and I’m trying to rewrite it to
make use of window.location.hash to set proper tab after the page is
loaded. It more or less works, but the main problem is that I got some
forms and I don’t know how to set their url correctly, so that after
the form is sent, proper tab is opened again.
I could use remote forms, so that user always stays on the same page,
but I’d prefer not to use them, unless it can’t be done in any other
way.
You should be able to use some javascript to set a hidden form field.
Maybe onsubmit of the form or onclick of the submit button. The first
thing I’d try is