# Form questions

**URL:** <https://forum.kirupa.com/t/form-questions/62201>\
**Category:** Uncategorized\
**Created:** [August 25, 2004, 8:23pm UTC](https://forum.kirupa.com/t/form-questions/62201 "2004-08-25T20:23:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![benjah](https://avatars.discourse-cdn.com/v4/letter/b/fbc32d/32.png) [@benjah](https://forum.kirupa.com/u/benjah)\
**Post date:** [August 25, 2004, 8:23pm UTC](https://forum.kirupa.com/t/form-questions/62201/1 "2004-08-25T20:23:54Z")

</div>

i have a few small form questions answer any that you know how to.

first question:  
what is the coding to insert into the “input” tag to make a text box change colors when somone types in it?

second question:  
how do you make it so you can’t submit a form unless you have entered something into a particular text box? for intance, i want to make a certain text box required so that if you don’t enter something it won’t submit the form.

last question:  
I am trying to make a form that will submit the information in an email to me. however, it has been a while since i messed with and web design stuff, and i noticed that doing “form method=“post” action=[mailto:myemail@mydomain.com](mailto:myemail@mydomain.com) \<FORM [ACTION="mailto:myemailadress@mydomain.com](mailto:ACTION=%22mailto:myemailadress@mydomain.com)” METHOd=“post”\>no longer works in IE. (a blank email with the address pops up, i am sure you know what i mean)

so now the question is, how can i make it so my form is submited to my email? i would like to go with the most simple route if possible.

MANY MANY THANKS for taking the time to help me. i should probably just get JS book, but i don’t really have the money.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 25, 2004, 10:45pm UTC](https://forum.kirupa.com/t/form-questions/62201/2 "2004-08-25T22:45:09Z")

</div>

1. Do you mean the background of the text box or the color? Either way it can be done using javascript and css. By changing the class name on the desired event.

2.Instead of having a submit button \< input type=“submit” value=“submit” /\> make only a regular button that calls a javascript function: \< input type=“button” value=“submit” onclick=“checkForm” /\> and the javascript function would look something like this:

```auto
function checkForm(){
//do form check
formname.submit();
}

```

1. Not gonna happen. You have to use PHP, ASP, or another server-side language with Form Email enabled.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 26, 2004, 6:01pm UTC](https://forum.kirupa.com/t/form-questions/62201/3 "2004-08-26T18:01:11Z")

</div>

hmm, i think the way i worded my question was confusing.

what i want to do is have a text box, \<input type=“text”\> like that, that changes colors when you type in it. you use the onKey command to do it i think, i just don’t know how to do it.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 26, 2004, 8:15pm UTC](https://forum.kirupa.com/t/form-questions/62201/4 "2004-08-26T20:15:55Z")

</div>

[http://testserver.rastardesigns.com/classchange.html](http://testserver.rastardesigns.com/classchange.html)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 27, 2004, 5:55pm UTC](https://forum.kirupa.com/t/form-questions/62201/5 "2004-08-27T17:55:56Z")

</div>

i am really sorry, i wasn’t very clear with what i was asking. what you showed me did help with something else i was trying to do the other day, but my real question is how to change the background color of the text box.

for instance, if the text box is yellow to begin with, i want to to change to white when you begin typing in it.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 1, 2004, 12:43am UTC](https://forum.kirupa.com/t/form-questions/62201/6 "2004-09-01T00:43:09Z")

</div>

(From the above example)  
edit the css and change the events to ‘onFocus’ and ‘onBlur’
