Hi I am building an application which is supposed to be primarily powered by Ajax.It has an Ajax based navigation where when a person clicks a link, he is shown some data in an adjacent div.I am doing it by stopping the default action in a JavaScript function and doing an xhrGET
But the problem is that if the user disables JavaScript , he will be able to click the link and be transported to the page where the link points. Now this can be managed server side by checking whether it is an Ajax request or not and doing the needful… but what I need to do is to make those links un-navigable(if that is the correct term) when JavaScript has been disabled.
What should I do here
Ideally you should build your application so that it works both with and without javascript of course. But if you don’t want to do that then you would have to make the links unnavigable in the plain html.
Perhaps replace
with
and when your page loads use javascript to fix up the links.
As has already been said you should probably also show an error message on the page so that visitors with javascript turned off know why the page isn’t working.