When I highlight an input field using MochiKit.Visual.Highlight, its
background-color and background-image will be reset to "white" and
"none". The problem is, when the input field had no style at all, it
used the default browser style, which looks different.

It's probably best to show this using the interactive JavaScript
interpreter demo of MochiKit. Enter the following commands:

a=INPUT(); b=INPUT();
writeln(FORM(null, a, b)); Highlight(a);

The left input field will be highlighted,
and after that, it will look different from the right one.

The following is even more obvious:

a=INPUT({readonly:true}); b=INPUT({readonly:true});
writeln(FORM(null, a, b)); Highlight(a);

It seems I can reset the style like this:

s = a.style; s.backgroundColor = s.backgroundImage = '';

Unfortunately, it does still not redraw automatically, the old style
will only come back when I hover over the input field with the mouse.

Has anybody an idea how to properly reset the style or even improve the
Highlight function in MochiKit so that it does not change the style?

-- Christoph

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to mochikit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to