Previous Message
Next Message

Can CSS Be Used In Conjunction With JS To Provide Form Validation?

Sent by CSS LIST EMAIL on 10 January 2004 01:01


Ben wrote:

Each of your fields has a name attached.  So:

document.forms[0].elements["someElement"].style.foo = "someValue";

should do the trick.

You may want instead to work with your form element *labels*, which is
somewhat more of a challenge.

Let's suppose that you've assigned a class to each of your labels, for
example:

#myForm .labelClass {
  background-color: white;
  color: black;
}

HTH
----------------------------------------------------------------------------
-----------------

Thanks Ben, I shall give this a shot.  Its sort of what I was looking into!

Anthony




______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread:

Possibly related: