Hi Rob,
Thanks for the reply.
> The value of an option element is CDATA[1], about which the W3C HTML 4
> specification says:
[ambiguous non-committal crap :-]
Anyway, I was able to work out that my x.options[x.length] = new
Option(string,pos) should've been (string,string) and then if I returned the
options[n].VALUE rather than .TEXT I managed to get the white-space intact.
Just another part of browsers' rich tapestry I suppose
Please bear with me as there's bound to be a few more of these. I'm not an
IE (or Microsoft) lover, but (at first glance) Firefox doesn't seem to be
all it's cracked up to be. How do you get Firebug going 'cos at least IE
gave you the line number it barfed at. (Come to think of it, at least it
barfed in the first place and let you double-click on the error rather than
this Firefox deathly silence)
Cheers Richard Maher
"RobG" <> wrote in message
news: ups.com...
> On Jul 3, 3:44 pm, "Richard Maher" <maher...@hotspamnotmail.com>
> wrote:
> > Hi,
> >
> > Can someone please show me how to tell Firefox to preseve white-space
when
> > returning the selectList.option[n].value attribute?
> >
> > I have change the style so that the white-space is preserved on the
screen,
> > but for some bizarre reason when I try to substring out a series of
bytes
> > (aka a fixed-length string or field) from a given option it squashes
> > everything up and corrupts the result.
>
> The value of an option element is CDATA[1], about which the W3C HTML 4
> specification says:
>
> "User agents may ignore leading and trailing white space
> in CDATA attribute values (e.g., " myval " may be
> interpreted as "myval"). Authors should not declare attribute
> values with leading or trailing white space."
>
> <URL: http://www.w3.org/TR/html4/types.html#type-cdata >
>
>
> > BTW. Works fine on IE.
>
> Hooray for IE, however both IE and Firefox are consistent with the
> spec.
>
>
> 1. <URL: http://www.w3.org/TR/html4/interact/...f-value-OPTION
> >
> --
> Rob
>