Resize control using JavaScript

Theo

Member
Joined
Aug 11, 2006
Messages
14
Location
Netherlands
Hi all,

I want to resize a listbox using JavaScript. I want to check the current resolution of a user and then take appropriate measures.

This is what I have so far:

Code:
function CheckResolution() {
    if (screen.availWidth == 1024)
    {
        document.forms[0].lbTest.Height = 200px;
    }
    else
    {
        document.forms[0].lbTest.Height = 400px;
    }
}

But nothing happends. Can someone help me with this?

Thanks,

Theo
 
Back
Top