M
Mateo
Hi!
I have labels on my page (some are web forms controls, and some are plain
HTML labels), and I need
Mozilla compatibile way for reading label value.
For example, in IE I can use this:
value = document.form1.lblMyLabelControl.innerText;
but, innerText property is not compatibile with W3 DOM, so mozilla doesn't
support this.
There is also innerHTML property, whichis not compatibile with W3 DOM, but
mozilla
supports this property (?!!?!). But this is not my favorite becouse it
returns complete HTML
between start and end tag, and I need only string text.
It looks like .value or .text properties doesn't exist for label control, so
I cannot use them...
There is "nodeValue" property which doesn't return what I need (and I need
only text contained
in label control)....
So, it looks like it's pretty hard to find method for getting text from
label which works in Mozilla and IE?!
Or I'm pretty stupid or tired to find solution for this SIMPLE problem.
(It would be also nice to find universal way for setting text for label or
values in INPUT fields,
but I would be pretty satisfied only with reading text from label...)
Thank you guys...
I have labels on my page (some are web forms controls, and some are plain
HTML labels), and I need
Mozilla compatibile way for reading label value.
For example, in IE I can use this:
value = document.form1.lblMyLabelControl.innerText;
but, innerText property is not compatibile with W3 DOM, so mozilla doesn't
support this.
There is also innerHTML property, whichis not compatibile with W3 DOM, but
mozilla
supports this property (?!!?!). But this is not my favorite becouse it
returns complete HTML
between start and end tag, and I need only string text.
It looks like .value or .text properties doesn't exist for label control, so
I cannot use them...
There is "nodeValue" property which doesn't return what I need (and I need
only text contained
in label control)....
So, it looks like it's pretty hard to find method for getting text from
label which works in Mozilla and IE?!
Or I'm pretty stupid or tired to find solution for this SIMPLE problem.
(It would be also nice to find universal way for setting text for label or
values in INPUT fields,
but I would be pretty satisfied only with reading text from label...)
Thank you guys...