to set a value and submit it...if the page can read the value then JS is enabled else show note to turn js on...
<?
//check for js enabled
if (!HTTP_POST_VARS){ //see if the form has been submitted
echo "
<html>
<script language="javascript">
function checkjs(){
forms[0].check.value=1; //javascript enabled
form.submit();
}
</script>
<body onLoad=\"checkjs();\">
<form names=\"test\" action=\"$_SERVER[PHP_SELF]" method=\"post\">
<input type=\"hidden\" name=\"check\">
</form>
</body>
</html>
";
} else {
if (!$check){ //check not submitted ie no value
echo "Please enable javascripting.";
}elseif($check==1){ //check has value assigned -- js okay
//redirect the user to another page if js enabled okay
header("location:www.mysite.com/anotherpage.php");
}else{ //just in case i did something wrong
echo "there is a error somewhere";
}
?>
hth