Hi,
I have login button which opens a modal on click. The modal can be closes in three different ways:
– clicking the close button– clicking outside the modal (on its background container)– pressing the escape key
The modal xhr loads a login or registration form. After submitting the form (POST), the server (Python Flask) sends a redirect to the home page. My problem is that the modal is still open after this redirect which leads to a glitched view.
How can I close the modal after receiving the redirect? I could pass a url parameter but I feel there must be an easier, cleaner solution.
PS: I am very new to JS and also new to webdev in general.