Let me see if I understand...

Are you saying in a JavaScript alert you want to have it
say the label of the form field (in your example
"Effective:") automatically (ie Not Hardcoding that part of
the alert message)?

I guess I've never run across that as a problem as you
normally control the alert text for each field you have on
the web page.  And to be honest, I've never found a good
use for LABEL.

And, this is client side validation.  It's only the 2nd
most important validation.  Still not worth it to me.
 Added and unneeded complexity.  :)

Brad
www.bvstools.com

On Thu, 2 Oct 2003 17:04:49 -0700
 "Eric Kempter" <EKempter@xxxxxxxxxxxxxxx> wrote:
> The problem is in returning the label of the form field
> with the error.  For instance:
> 
> <LABEL><font color="red">*</font>Effective: <input
> type="date" name="effDate" size="10" border="0"></LABEL>
> 
> If the Effective date it wrong, it is simple to alert:
> effDate is incorrect / blank or <effDate value> is
> incorrect but it is substantially more difficult to
> alert: Effective: is incorrect because it is practically
> impossible to consistently retrieve LABEL form field
> names (in a for loop or otherwise) because of the format
> differences between HTML pages/forms.  You have to drill
> through the BOM.
> 

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.