Click to See Complete Forum and Search --> : Undo pixelWidth


KNoodles
April 28th, 2004, 12:16 AM
Hi,

I have a few <select> objects generated from javascript. Their width is being set by:

document.all.tags("select")(x).style.pixelWidth=maxwdth;

When I add more options after resizing them, the drop down lists don't resize automatically in the browser anymore. Is there a way to enable automatic resizing again after using pixelWidth?

KNoodles

khp
April 28th, 2004, 01:08 AM
You might be able to do something like

document.all.tags("select")(x).style.removeAttribute("pixelWidth")

KNoodles
April 28th, 2004, 01:57 AM
Thanks for a quick reply. Removing pixelWidth didn't help but got me on the right path.

This has worked for me..

document.all.tags("select")(x).style.removeAttribute("width");

Thanks for your help