|
Posted by Noozer on 04/01/06 16:16
"Edwin van der Vaart" <e.vandervaart@nospamgmail.com> wrote in message
news:3IuXf.8491$zc1.648@amstwist00...
> LeftHorn wrote:
>> Hi,
>>
>> I have a problem...Got a webpage with alot of different input fields -
>> where a user can maintain a database.
>>
>> They are allowed to use 'spaces' in their textfields, sometimes they
>> require to insert a space in the end, sometimes it would be fatal if they
>> do - the problem is that from a visual point of view the inputfield is
>> like this:
>>
>> TextColor Black
>> BackGround White
>>
>> 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.
It's a bad interface if it depends on spaces at the end of items, but this
may not be under your control.
Off the top of my head what I would do is create three small javascript
functions...
#1 - Called when the data is put into the form. Converts all spaces in all
fields to a normally unused character (like "¬" - if that even goes through
the newsgroups).
#2 - Called when the form is submitted. Converts all these special
characters back to spaces.
#3 - Called by the OnKeyPress event of each field. It would make sure that
any spaces typed by the user are changed to your special character.
http://www.devguru.com/technologies/ecmascript/quickref/evhan_onKeyPress.html
Navigation:
[Reply to this message]
|