MDanz 0 Junior Poster

i'm trying to simplify the url, how do i do this within the code below..

if width & height = 1024 & 768 and declare that as variable "1".
if width & height = 1360 & 768 and declare that as variable "2".
then the url would be test.php?s=1 for the width and height 1024x768

<script type="text/javascript">

width = screen.width;
height = screen.height;

if (width > 0 && height >0) {


    window.location.href = "test.php?w=" + width + "&h=" + height;
} else 
    exit();

</script>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.