Dilantha Seneviratne said:
Could someone advice me on how I detect if JavaScript
is switched off from a browser.
It is unclear whether you are interested in detecting if a browser is
incapable of executing javascript or whether it is a browser that could
execute javascript but on which it has been disabled. It probably
doesn't matter in practice, as there won't be any way of telling the two
apart.
A test is only useful if you can do something with the result, and
without the ability to execute scripts there is nothing you can do in
response to the inability to execute scripts.
It is also the case that an ability on the part of a browser to execute
javascript does not mean that any given script will successfully execute
on that browsers.
Richard.