Re: Retrive a ID or Class value from a form input field
| From: | Joe Harman | Date: | Mon, 09 Jun 2008 20:25:40 +0000 |
| Subject: | Re: Retrive a ID or Class value from a form input field | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-275160@lists.php.net to get a copy of this message | ||
I was just writing a form validation script... I know that there is
ton of them out there... and i know that there are some different
methods of doing it... but i want to assign class names to each field
like class="req:email"... not sure if that is the right way to do it,
but i thought it would make thing neat and tidy
Thanks for all your input
Joe
On Mon, Jun 9, 2008 at 3:09 PM, Jim Lucas <lists@cmsws.com> wrote:
> Jim Lucas wrote:
>>
>> Jim Lucas wrote:
>>>
>>> Joe Harman wrote:
>>>>
>>>> Hello,
>>>>
>>>> is there any way to get more field information other than just the
>>>> value of a field when a form is submitted???
>>>>
>>>> ex:
>>>> <input name="email" type="text" id="email"
>>>> size="30" maxlength="120"
>>>> class="theClass" value="" />
>>>>
>>>> type, size, class, etc.
>>>>
>>>> Thanks
>>>> Joe
>>>>
>>>
>>> Yes, but that would be a Javascript question.
>>>
>>> Google for a javascript method called getAttribute()
>>>
>>
>> Man, what a day.
>>
>> I should have said it like this.
>>
>> No, but in javascript, before the form is submitted, you can.
>>
>> then....
>>
>
> Let me ask this. Why would you want to do this?
>
> --
> Jim Lucas
>
> "Some men are born to greatness, some achieve greatness,
> and some have greatness thrust upon them."
>
> Twelfth Night, Act II, Scene V
> by William Shakespeare
>
>
--
Joe Harman
SCP Performance Parts Warehouse
3475 High Ridge Blvd
High Ridge, MO 63049
Office : (636) 677-1320
Cell : (269) 277-0717
http://www.scpracingparts.com