You are here: Re: Textcolor, Backgroundcolor - but i need TextBackgroundcolor ? « HTML « IT news, forums, messages
Re: Textcolor, Backgroundcolor - but i need TextBackgroundcolor ?

Posted by Mitja Trampus on 04/01/06 21:24

LeftHorn wrote:
> Hi,
>
> I have a problem...Got a webpage with alot of different input fields - where
> a user can maintain a database.
>
> Nobody are able to see how many spaces there is after a string, unless the
> cursor is placed in the field - i need somehow to get a different
> TextBackgroundColor (ex. gray) then they would be able to locate it by
> sight, instead of having to manually run through all fields.
>
> Can this be done ? by HTML or JS or something ? hope you can help.

Nope, JS can't do that - you don't have enough control over the form elements to apply
style to them letter by letter.

Two alternatives:
1) A rather contrived one, not recommended: substitute each <input> with an iframe.
Requires quite a bit of javascript to make it look and work like an input box, works
slower and so on. I would never use it in a situation like yours. If you must, google for
javascript rich textarea.
2) Instead of coloring the spaces at the end of the input box, warn the user about those
spaces in another way (not by coloring those exact spaces). You could for example make a
red asterisk appear beside the textbox in question. Or you could color the whole textbox
yellow - if you let the users know wwhat that means, it can be just as effective. Still
requires JS, of course, but is much cleaner. Google for javascript events and onkeypress.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация