Highlighting text box makes it look like Windows 95

4 views
Skip to first unread message

JoJo

unread,
Sep 11, 2009, 7:40:00 PM9/11/09
to Prototype & script.aculo.us
I'm highlighting an input textbox if the user forgot to fill out the
form. After the box get highlighted, it looks like retro Windows 95
with thick borders and boxy edges. So I attempt to remove the styling
with an afterFinish callback, but for some reason, that is never
called. Why?

if ($F('feedbackName').blank()) {
new Effect.Highlight(
'feedbackName', {
afterFinish: function() {
$('feedbackName').setStyle();
}
}
);
allFieldsFilledOut = false;
}

Alex McAuley

unread,
Sep 12, 2009, 3:34:28 AM9/12/09
to prototype-s...@googlegroups.com
setStyle() requires parameters


Alex Mcauley
http://www.thevacancymarket.com

Marko

unread,
Sep 12, 2009, 9:08:36 AM9/12/09
to prototype-s...@googlegroups.com
Maybe you should try this:

$('feedbackName')|.writeAttribute("style", null)|

It will remove style attribute from element.

Marko

JoJo

unread,
Sep 15, 2009, 12:33:37 AM9/15/09
to Prototype & script.aculo.us
I tried your writeAttribute method. In Firebug's HTML tab, I
witnessed the style attribute being removed, but visually, I did not
SEE it being removed. The input box only went back to normal after I
rolled over it with my mouse.

Marko

unread,
Sep 15, 2009, 8:44:14 AM9/15/09
to prototype-s...@googlegroups.com
Well, I've just try it and can confirm that behaviour. I would suggest
these options:

1. Change effect to pulsate (I've tested it in FF) or some other
2. Create overlay div and apply effect highlight to it
3. Change the look of buttons (bg color, border) when you apply
highlight effect it will not break

Marko
Reply all
Reply to author
Forward
0 new messages