numberedtree
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 1
Javascript::Menu 2.02
Javascript::Menu is a NumberedTree that generates HTML and Javascript code for a menu. more>>
Javascript::Menu is a NumberedTree that generates HTML and Javascript code for
a menu.
SYNOPSIS
use Javascript::Menu;
# Give it something to do (example changes the menus caption):
my $action = sub {
my $self = shift;
my ($level, $unique) = @_;
my $value = $self->getValue;
return "getElementById(caption_$unique).innerHTML=$value";
};
# Build the tree:
my $menu = Javascript::Menu->convert(tree => $otherTree, action => $action);
my $menu = Javascript::Menu->readDB(source_name => $table, source => $dbh,
action => $action);
my $menu = Javascript::Menu->new(value => Please select a parrot,
action => $action);
my $blue = $menu->append(value => Norwegian Blue);
$blue->append(value => Pushing up the daisies);
$menu->append(value => A Snail);
# Or maybe you just want a navigational menu?
my $menu = Javascript::Menu->new(value => Please select a prime minister);
$menu->append(value => Ariel Sharon,
URL => www.corruption.org/ariel_sharon.htm);
$menu->append(value => Benjamin Netanyahu,
URL => www.corruption.org/bibi.htm);
$menu->append(value => Shaul Mofaz, URL => www.martial_law.org);
# Print it out as a right-to-left menu:
my $css = $menu->buildCSS($menu->reasonableCSS);
print $cgi->start_html(-script => $menu->baseJS(rtl),
-style => $css); #CSS plays an important role.
print $tree->getHTML;
Javascript::Menu is an object that helps in creating the HTML, Javascript, and some of the CSS required for a table-based menu. There are a few other modules that deal with menus, But as I browsed through them, I found that none of them exactly fitted my needs. So I designed this module, with the following goals in mind:
Flexibility
The main feature of this module is the ability to supply all nodes or any specific node with a subroutine that is activated in time of the code generation to help decide what the item will do when it is clicked. This allows customisation far beyond associating a link with every item. Multy-level selection menus become very easy to do (and this is, in fact, what I needed when I started writing this).
I18n
Working with i18n (internationalization) can be a big headache. Working with Hebrew (or Arabic) forces you not only to change your charachters, but also to change your direction of writing. I incorporated into this module the ability to produce right-to-left menus and tested it using a legacy ASCII-based encoding (iso-8859-8).
Object Hierarchy
I designed the module to work with two other modules of mine, Tree::Numbered and Tree::Numbered::DB, which simplify the task of building the menu and allow for construction of a menu from database information.
The current version adds support for highlighting the item thats hovered over. Youll find that having made some preliminary steps, like tweaking the CSS to look the way you like it to, the rest is fairly easy.
<<lessa menu.
SYNOPSIS
use Javascript::Menu;
# Give it something to do (example changes the menus caption):
my $action = sub {
my $self = shift;
my ($level, $unique) = @_;
my $value = $self->getValue;
return "getElementById(caption_$unique).innerHTML=$value";
};
# Build the tree:
my $menu = Javascript::Menu->convert(tree => $otherTree, action => $action);
my $menu = Javascript::Menu->readDB(source_name => $table, source => $dbh,
action => $action);
my $menu = Javascript::Menu->new(value => Please select a parrot,
action => $action);
my $blue = $menu->append(value => Norwegian Blue);
$blue->append(value => Pushing up the daisies);
$menu->append(value => A Snail);
# Or maybe you just want a navigational menu?
my $menu = Javascript::Menu->new(value => Please select a prime minister);
$menu->append(value => Ariel Sharon,
URL => www.corruption.org/ariel_sharon.htm);
$menu->append(value => Benjamin Netanyahu,
URL => www.corruption.org/bibi.htm);
$menu->append(value => Shaul Mofaz, URL => www.martial_law.org);
# Print it out as a right-to-left menu:
my $css = $menu->buildCSS($menu->reasonableCSS);
print $cgi->start_html(-script => $menu->baseJS(rtl),
-style => $css); #CSS plays an important role.
print $tree->getHTML;
Javascript::Menu is an object that helps in creating the HTML, Javascript, and some of the CSS required for a table-based menu. There are a few other modules that deal with menus, But as I browsed through them, I found that none of them exactly fitted my needs. So I designed this module, with the following goals in mind:
Flexibility
The main feature of this module is the ability to supply all nodes or any specific node with a subroutine that is activated in time of the code generation to help decide what the item will do when it is clicked. This allows customisation far beyond associating a link with every item. Multy-level selection menus become very easy to do (and this is, in fact, what I needed when I started writing this).
I18n
Working with i18n (internationalization) can be a big headache. Working with Hebrew (or Arabic) forces you not only to change your charachters, but also to change your direction of writing. I incorporated into this module the ability to produce right-to-left menus and tested it using a legacy ASCII-based encoding (iso-8859-8).
Object Hierarchy
I designed the module to work with two other modules of mine, Tree::Numbered and Tree::Numbered::DB, which simplify the task of building the menu and allow for construction of a menu from database information.
The current version adds support for highlighting the item thats hovered over. Youll find that having made some preliminary steps, like tweaking the CSS to look the way you like it to, the rest is fairly easy.
Download (0.025MB)
Added: 2006-06-12 License: Perl Artistic License Price:
1235 downloads
Secleted [ 0 ] software to compare
- Page: 1 of 1
- 1
Copyright Notice:
Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future software development. The above numberedtree search only lists software in full, demo and trial versions for free download. Download links are directly from our mirror sites or publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed