--- Abdul Qadir <[EMAIL PROTECTED]> wrote:

> how can we enable/disable Javascript of the browser by using PHP

You cannot and should not be able to affect whether Javascript is turned on in
the browser through any legitimate means.  Browser choices made by the user
should not be overridden by any Javascript (client-side) or PHP program.  This
would be a significant security violation.

You can detect to see if JS is on with one of several techniques.  If it is
off, you can put a page up to suggest that the user turn it on to get full
function from your site.  The same is true for cookies.

If you are a skilled programmer, you can create pages which don't even need JS
to function.  JS can be used for some interesting behaviors but since it is
turned off in a percentage of visitors' browsers, it is best to achieve the
complete functionality without JS.  Imagine the situation of people using
either a handheld device with a minimal web browser or someone who uses a
text-based browser to assist with a disability such as blindness.  If you
require, JS, these features may not work at all for them.  JS is for the bonus
features if they are needed for your application.

James

Reply via email to