List Info

Thread: JavaScript: Reading/Writing to TextArea with "innerText"




JavaScript: Reading/Writing to TextArea with "innerText"
country flaguser name
Germany
2007-06-06 03:52:57

Section 0

Hint
Tutor
Thesaurus
Tree
  Approximate file size 4634 bytes
  Approximate file size 923 bytes
Help with KJS
country flaguser name
United States
2007-06-06 04:08:41
Hi All,

I am new to KJS and wanted some documentation on as to how
the Java run
time and contexts are created with KJS. Additionally, I am
looking for
some basic information on as to how much memory is used when
we run a
Javascript using the KJS engine.

Thanks,
Ankush.

Re: JavaScript: Reading/Writing to TextArea with "innerText"
country flaguser name
Italy
2007-06-06 04:06:41
ON MERCOLEDì 06 GIUGNO 2007, STEFAN EILERS WROTE:
> HI!
>
> AT THE MOMENT I HAVE SOME FUN WITH EXTENDING KONQUEROR
TO SUPPORT A
> SPECIAL WEB SERVICE. AMONG OTHER PROBLEMS WHICH STILL
NEEDS TO BE
> FIXED (LIKE A PROPER SUPPORT OF IFRAMES), I HAD TO ADD
A FEATURE
> WHICH SEEMS TO BE SUPPORTED BY IE (SEE EXAMPLE
"EINGABEFELD.HTML"
> BELOW). THE EXAMPLE CHANGES THE ATTRIBUTE
"INNERTEXT" WITHIN A
> TEXTAREA. THIS PATCH ADDS READING AND WRITING TO A
TEXTAREA WHICH WAS
> NOT AVAILABLE IN THE IMPLEMENTATION IN KDELIBS 3.5.X.
THE
> MODIFICATION IS QUITE SIMPLE, THEREFORE I WOULD LIKE TO
ASK WHETHER
> THIS MODIFICATION IS OK OR NOT. IN THE LATTER CASE: IT
WOULD BE NICE
> TO KNOW WHAT NEEDS TO BE ADDED TO IMPLEMENT IT THE
RIGHT WAY.
>

THE PATCH IS INDEED QUITE SIMPLE; ITS LACK MAY EVEN BE
CONSIDERED 
A "COMPATIBILITY BUG" WITH IE. IS THE SAME FEATURE
SUPPORTED ALSO IN 
FIREFOX? IF SO, IT WOULD BE EVEN MORE COMPELLING TO COMMIT
THE PATCH.

LUCIANO  





-- 
./.. ../ /./. .. ./ /. ///   // /// /. / ./ /. ./ ./. ///
././. //
                                                           
\ //
                                             WWW.CIRULLA.NET
X/

Re: JavaScript: Reading/Writing to TextArea with "innerText"
country flaguser name
United States
2007-06-06 08:22:43
> Hi!
>
> At the moment I have some fun with extending konqueror
to support a
> special web service. Among other problems which still
needs to be
> fixed (like a proper support of iFrames), I had to add
a feature
> which seems to be supported by IE (see example
"eingabefeld.html"
> below). The example changes the attribute
"innerText" within a
> textarea. This patch adds reading and writing to a
textarea which was
> not available in the implementation in KDELibs 3.5.x.
The
> modification is quite simple, therefore I would like to
ask whether
> this modification is ok or not. In the latter case: It
would be nice
> to know what needs to be added to implement it the
right way.

Good catch, but I am afraid this isn't neccesserilly so
simple. The reason
it "doesn't work" is that the value of a text area
isn't the same as the
value of its text children, which is what the normal
innerText changes.

So there are a couple of questions that need to be answered
first:
a) Does changing the child text nodes reset the value? If
so, innerText
should not be changed, but HTMLFormElementImpl needs to work
for child
changes, which would be rather tricky.

b) Does setting innerText change the DOM children? If so,
your patch
should probably be using setDefaultValue, not setValue.

c) If value isn't the same as defaultValue, which one does
innerText return?

Also, it'd probably be better to implement this in html/ and
not ecma/ ---
by making setInnerText/innerText virtual and overriding in
HTMLTextAreaImpl

Do you have any real testcases, and not just an example?

Thanks,
Maks



Re: JavaScript: Reading/Writing to TextArea with "innerText"
country flaguser name
Austria
2007-06-06 12:30:23
Am Mittwoch, 6. Juni 2007 schrieb Luciano Montanaro:
> > The example changes the attribute
"innerText" within a
> > textarea. This patch adds reading and writing to a
textarea which was
> > not available in the implementation in KDELibs
3.5.x. [...]
>
> The patch is indeed quite simple; its lack may even be
considered
> a "compatibility bug" with IE. Is the same
feature supported also in
> Firefox? If so, it would be even more compelling to
commit the patch.

I agree. This is an interoperability bug. I highly recommend
including this 
patch in KDE 3.5.8.

mfg
	Leo


Re: JavaScript: Reading/Writing to TextArea with "innerText"
country flaguser name
Austria
2007-06-06 12:45:59
Am Mittwoch, 6. Juni 2007 schrieb Maksim Orlovich:
> > [...] The example changes the attribute
"innerText" within a
> > textarea. This patch adds reading and writing to a
textarea which was
> > [...]
>
> Good catch, but I am afraid this isn't neccesserilly so
simple. [...]
>
> Do you have any real testcases, and not just an
example?

I may add that for interop, it is sensible to answer open
questions on IE/Moz. 
The only problem we get is if IE differs from Moz. In this
case, we should 
lean towards the Moz variant as khtml advertises itself as
Gecko compatible.

mfg
	Leo


[1-6]

about | contact  Other archives ( Real Estate discussion Medical topics )