Firefox option indentation

Firefox option indentation

am 27.06.2007 05:21:22 von wassa

Hi

Can anybody tell me why this doesn't work in Firefox?

sel.options[sel.options.length] = new Option("\u0020\u0020-
\u0020\u0020Option 1", 1);

Basically I'm trying to indent some options but Firefox refuses to
show those spaces!

Thanks for any help.

Re: Firefox option indentation

am 27.06.2007 06:01:19 von Nik Coughlin

nick wrote:
> Hi
>
> Can anybody tell me why this doesn't work in Firefox?
>
> sel.options[sel.options.length] = new Option("\u0020\u0020-
> \u0020\u0020Option 1", 1);
>
> Basically I'm trying to indent some options but Firefox refuses to
> show those spaces!
>
> Thanks for any help.

Sounds like Firefox is calling some sort of trim method on the string
internally, but that's just a guess