[Javascript] Setting the size/width of a select control.

Judah Frangipane judah-fc at t8design.com
Fri Oct 14 10:49:10 CDT 2005


Hi Matt,

Set the style property. IE

< select name="select" style="width:800px" 
onClick="this.style.width='400px'" >
    < option >item 1< / option >
    < option >item 2< / option >
  < /select >

Then in javascript get a reference to the control and set the width again.

It's been a while since I've done this and I'm not at my home computer 
let me know if you need more help.

Judah

Matt Barton wrote:

> Hi,
>
> Is there any way to dynamically control the size/width of a <select> 
> control?  It seems to be something so simple, that I'm amazed I can't 
> find anything in my books.
>
> I hope I'm missing something staggeringly obvious ...
>
> Thanks
>
> Matt
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
>
>
>




More information about the Javascript mailing list