NAME
HTML::Tag - Another HTML Widget system
SYNOPSIS
use HTML::Tag::Lang::en; # autolang using $LC_MESSAGES or $LANG ENV vars.
use HTML::Tag;
# This generate a YEAR combobox
my $year_field = new HTML::Tag(
element => 'YEAR',
name => $year_field_name,
selected => $year_to_select
)->html;
# This generate a YES/NO combobox with an empty string element for null value.
my $yesno_field = new HTML::Tag(
element => 'BOOLSELECT',
name => $bool_field_name,
selected => $yes_or_no,
maybenull => 1
)->html;
# This generate an advanced date control (see later)
my $date_field = new HTML::Tag(
element => 'DATE',
name => $date_field_name,
value => $date_to_show
)->html;
GENESIS
If you are a web developer such as me, you know that many times you needed to use html controls that are not directly available in the HTML language.
Every time you needed of use a datetime input control or to validate an input field you needed to mix html, javascript and cascade style sheet to make what you want. And, in every project you needed that, you needed to find all the required code for you "advanced" control or you must reinvent the wheel.
This module try to encapsulate these advanced widget so that you can forget all inside code and substitute with a few lines of perl.
Be aware, the HTML code generated by this module use heavy javascript and css code and so are not compatible with all browser. Like every time, you need to make a compromised between great input feedback and browser compatibility.
HTML code generated by this module has teste with Microsoft(R) Internet Explorer 5.5 and greater and with Mozilla Firefox 1.0 and greater. Let me know if notice tis module works in other browser.
DESCRIPTION
To have an idea of what kind of widgets are currently (1.00) available let me describe the DATE widget.
This is a date control built with three combo (select) input field. With these combos you can select day, month and year.
You can also select date by pressing a button that opens a popup calendar (http://www.dynarch.com/projects/calendar/).
Another way, and this is great for me, is the ability to enter date directly with keyboard. If you press a key the combobox becomes a textbox and this give you the possibility to enter date with keyboard
After that, when you post the form, only an hidden field with the date you set in the visible controls, has sent.
All these layouts (combo/textbox and hidden field) are alway syncronized to have the same date value.
METHODS
To do.
LICENSE
HTML::Tag - Another HTML Widget system
Copyright (C) 2005 Bruni Emiliano <info AT ebruni DOT it>
This module is free software; you can redistribute it and/or modify it under the terms of either:
a) the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version, or
b) the "Artistic License" which comes with this module.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the GNU General Public License or the Artistic License for more details.
You should have received a copy of the Artistic License with this module, in the file ARTISTIC. If not, I'll be glad to provide one.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
AUTHOR
Bruni Emiliano, <info/at/ebruni_dot_it>
Many thanks to Mihai Bazon, <mihai_bazon/at/yahoo_dot_com> for its beautiful DHTML Calendar.
SEE ALSO
HTML::Tag::DATE HTML::Tag::HIDDEN HTML::Tag::MONTH HTML::Tag::PASSWORD HTML::Tag::SELECT HTML::Tag::SPAN HTML::Tag::TEXTAREA HTML::Tag::TEXTFIELD HTML::Tag::YEAR HTML::Tag::DATE HTML::Tag::TIME HTML::Tag::DATETIME HTML::Tag::BOOLSELECT HTML::Tag::Lang