I have a button that calls a function which:
Performs an AJAX PHP request to a DB
Displays retrieved data in a div container
Scrolls to that bookmarked (#) div container
I'd like to have a button doing the same tasks but doing it opening a new tab and scrolling to the div. So it has to:
- Open the new tab
- Call the function that performs the request
- Display retrieved data in a div container
- Scroll to that bookmarked (#) div container
How can I achieve this?