Search code examples
phpformsscrollpositionreturn

Any ideas on how to get PHP form to return to particular row/column?


Hoping for some brainstorming here. I have a PHP app that submits a form and returns to a page with lots of columns and rows (scrolls in both x and y). Any ideas of how I might be able to get the screen to return to center on a particular ?

I'm open to just about any solution!

Thanks for the ideas!


Solution

  • You need to use CSS style ID's.

    If you add #someTag at the end of your URL, the page will try to scroll to the matching ID. So, put unique ID's on your table Rows, and add the ID if the row to scroll to either to the redirect after the form, or the form action.