I have a button which links to another page. Before I click that link, I want to check if that page currently returns an error or if it is not existing. How can I code this? Is this possible? I want to disable the link if it is not existing or if it returns an error.
Share
You could use ajax to load the page and then parse it to see if there’s an error before you then redirect the user. I would also include some kind of note to the user as to why the link isn’t working.