1
I have a screen that lists my products. To register a new product, open another screen to enter the data and so register, on this same screen I have a back button, in it I have the code onClick="history.back()"
, but when it comes back to the list of products, that product that I just registered does not list, only lists when I do a new search.
Is there any way to go back and update the list? Something like, history.back() + location.reload()
.
Since you’re working with PHP, why don’t you try creating a header("Location: suaURL"). Thus, the code will automatically return it to the previous page.
– Cobra
On the back button?
– Alisson Hoepers
Is the back button necessary? The way I indicated, after INSERT in PHP, would be redirected automatically.
– Cobra
But I do the Insert with ajax
– Alisson Hoepers
Any other suggestion?
– Alisson Hoepers
Could you put some code (the one on the list of products) so we can visualise best, see how pupulated this list is!
– Igor Mello