Your question isn't clear. You want to enable javascript on a users browser after they have disabled it? it's not possible. Or you want to output javascript from a PHP script? <?php header("content-type: application/x-javascript"); // output javascript code here ?> PHP:
You can only check if javascript is enabled or not bu you cannot do anything on client side unless he gave the permission to do so