nevermind that post im being stupid and writing the script in the wrong place...
ok so javascript works... but as you said if javascript is disabled then no luck... so far i have:
Code:
echo "
<script LANGUAGE='javascript'>
<!--
if(top.location.href != 'http://example.com/example.php' && top.location.href != 'http://example.com/example.php#non'){
top.location.href = 'http://example.com/example.php';
}
-->
</script>";
So how am i now supposed to prevent people from just turning off javascript, opening the page, and clicking away?
What i have is:
Code:
<script language='javascript' type='text/javascript'>
function checkJavaScriptValidity()
{
document.getElementById(\"vischeck\").style.visibility = 'visible';
document.getElementById(\"vischeck2\").style.visibility = 'hidden';
}
</script>
<body onload='checkJavaScriptValidity()'>
and
Code:
<div id=vischeck style='visibility:hidden'>javascript on</div><div id=vischeck2 style='visibility:visible'>javascript off</div>
but people are complaining that even when they have javascript on, they still sometimes see javascript off (obviously i have all the script on the javascript on div) and i COULD just put a javascript refresh in the javascript off div but its choppy enough, i dont think everyone wants me to make it even more choppy... and it just seems really weird that people would randomly see javascript off when they have it on... so im not sure why that would happen... there just HAS to be a better way to go about this other than javascript... even though its really nice and works perfectly, people can turn it off because its not server sided... and that defeats the purpose...
Bookmarks