PDA

View Full Version : How To stop Smart Users



Virus
September 30, 2004, 03:38 PM
I wrote some javascript code, but i don't want the user to disable javascript. How can i stop the a page from loading until the user enables javascript in their browser.

aonekilla
October 1, 2004, 09:51 AM
ahhh there are many ways this can be done ... the simplest solution i can think of now is just to set the style attribute visibility of the body to hidden in the html code ... and then in the javascript on load up reset it to visible .... something like



<body style="visibility:hidden">
....
</body>

<script>
document.body.style.visibility = "visible";
</script>

u can play around with this until u get what u want ....
of course there are other ways ... u can even do it so that a message is shown on the orignal page that tells the person to turn on the javascript .... if the javascript is on that message can be hidden with a variation of the code above ....