Reply to Re: Best solution to tedious form validation?

Your name:

Reply:


Posted by Rik Wasmus on 10/29/07 19:40

On Mon, 29 Oct 2007 19:43:32 +0100, otrWalter@gmail.com =

<otrWalter@gmail.com> wrote:

>
>> In your suggestion you have type=3D"text" and type=3D"alpha" in the s=
ame =

>> input
>> tag.
>
> Yes, sorry...
>
>
> <input type=3D"text"
> id=3D"first_name"
> name=3D"first_name"
> datatype=3D"alpha" <- new attribute int|alpha|phone=
|
> email|etc
> required=3D"true" <- new attribute true|false
> value=3D"">
>
> Thx for the catch

Well, let's invent HTML attributes? Invalid HTML means all bets are off =
on =

how anything will be handled, and only by the grace of UA's kind enough =
to =

process broken tagsoup HTML will it do anything resembling to what you =

want. Don't rely on that, use a real attribute. A classname comes to min=
d.

<input type=3D"text" name=3D"firstname" class=3D"foo alpha required" val=
ue=3D"">

It can more reliable be read using javascript, is valid, and is the plac=
e =

where you're supposed to put this kind of stuff.

http://www.w3.org/TR/html401/struct/global.html#adef-class
"The class attribute has several roles in HTML:
- As a style sheet selector (when an author wishes to assign style =

information to a set of elements).
- For general purpose processing by user agents."
-- =

Rik Wasmus

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация