Hi
I created a webpage that has a lot of javascript on it. what I want to do is when javascript is disabled on browser, change phpvar to 0 so php do not include any java files.
Here what I did:
/*--------Code-----------*/
<? php $
js=0; ?>
<script language="javascript">
var jsTest = navigator.javaEnabled();
if(jsTest)
js = 1;
</script>
<?
$
js = '<script language="javascript">document.write(
js);</script>';
if($
js == 1)
include("page.php");
else
echo "Error";
?>
But either way java disabled or not it still includes page.php.
I tried to output the $
js -> with java enabled is 1, otherwise it nothing.
My question is whats wrong with that code?
Thanks
Best Regards
Mani H.