Simple Javascript question. I hope...?
I'm using a simple script to detect the screen size of a visitors browser. That script will then send users with a screen width less than 800 pixels to a website of my choice. Here is the simple script:
<script type="text/javascript"> <!-- if (screen.width <= 800) { document.location = "http://www.google.com"; } //--> </script>
Is there anyway to do this?
I have tried using this code and it works at putting a message at the top of the page:
<script type="text/javascript"> <!-- if (screen.width <= 800) { document.writeln('hello world!'); } //--> </script>
Thanks!
Android Project Ideas