HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
How can I change text color when user changes a form?
Post new topic   Reply to topic    HTML Help Forum Index -> HTML Form
View previous topic :: View next topic  
Author Message
novice



Joined: 01 Jul 2004
Posts: 4

PostPosted: Thu Jul 01, 2004 1:01 pm     How can I change text color when user changes a form? Reply with quote

I'm creating a page to configure an embedded system. All the forms will contain the current value of configuration paramters. When the user changes them, I'd like to change the color of the text of the selected item, so the user can see what is being applied before pressing submit.

Any suggestions? How hard is this to do?
pesty



Joined: 22 Jul 2004
Posts: 28

PostPosted: Thu Jul 22, 2004 3:50 pm     Reply with quote

Hi Novice,

You may want to give a little more detail on what you are trying to do.

What kind of embedded system?

Quote:


When the user changes them, I'd like to change the color of the text of the selected item, so the user can see what is being applied before pressing submit.



Is it a selection list or will the user be changing something?
novice



Joined: 01 Jul 2004
Posts: 4

PostPosted: Thu Jul 22, 2004 3:54 pm     Reply with quote

It's a video processing system with a fair amount of memory. We're using the Allegro http stack.

I'm actually thinking of all kinds of forms -- some the user might type in a frequency, others are drop-down select boxes, checkboxes, or radio buttons. I'm just wondering if it's easy to change the color of the items the user has changed, so that it' really obvious what will be different after they hit submit.
pesty



Joined: 22 Jul 2004
Posts: 28

PostPosted: Thu Jul 22, 2004 4:38 pm     Reply with quote

ok novice,

We have narrowed it down a bit. We know what your making. Or sorta what your making.

But we're still a fuzzy on the form and user part. Are you wanting the text to change colors when the users passes over it? Or are you wanting the text that the user is personally typing in to be a different color?


Pesty
novice



Joined: 01 Jul 2004
Posts: 4

PostPosted: Thu Jul 22, 2004 4:40 pm     Reply with quote

To change color when the user types in text, or selects something new in the drop down. For example, if the dropdown starts out as "NTSC", and the user changes it to "PAL", can "PAL" be shown in red?
pesty



Joined: 22 Jul 2004
Posts: 28

PostPosted: Thu Jul 22, 2004 7:12 pm     Reply with quote

novice,


Here is a code that will allow the user to type text in a different color.

<input type="text" name="name" style="background-color: white;
border: 1px solid red; color:blue"><br>

You can change the background color and the text to suit your needs.

As for the selection array: You can use the onMouseOver to highlight the text in a different color. onMouse Over is a javascript event handler.Users cannot type into a dropdown selection field.

I have to tell you novice, before anyone can help you. You must first learn the difference between your text fields and dropdown lists.

This is a text field <input type="text" name="form" value="member">

This is a selection field, also called an option box, an array, or a list field.

<select name="animal">
<option value="a">Cat
<option value="b">Dog
<option value="c">Horse
</select>

A selection field can hold numerous choices.

In a selection field the choices are set for the user. Meaning the user cannot change or type in a value.


Although functions written in php and possibly javascript may be scripted to change the actual font color. You don't have enough knowledge under your belt to take that on. You must know your field names and commands and hmtl functions before you can advance to bigger and better things.

What you are trying to build can not be built with straight html.

Pesty
novice



Joined: 01 Jul 2004
Posts: 4

PostPosted: Fri Jul 23, 2004 7:47 am     Reply with quote

Thanks for all your help!
pesty



Joined: 22 Jul 2004
Posts: 28

PostPosted: Fri Jul 23, 2004 9:33 am     Reply with quote

You're welcome.

If you have any other questions, just ask.

But, make sure you know the differences in your form fields. Over 200 people had looked at your question with no one answering. You were referring to 2 different types of fields and combined them into one.
It confused people.

Forums like this is here to help you and help you learn. Use it.



Pesty
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> HTML Form All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial