Документ взят из кэша поисковой машины. Адрес оригинального документа : http://xray.sai.msu.ru/~mystery/html/layers/ZTab-0.04/example/test.pl
Дата изменения: Wed May 28 22:29:36 2003
Дата индексирования: Sat Dec 22 05:22:17 2007
Кодировка:
#!/usr/bin/perl

use strict;
use ZTab;

my $pwd = `pwd`;
chomp $pwd;

my $css = ZTab::make_css(
tab=>{'background-color' => 'lightblue'},
tabHover=>{'background-color'=> 'red' },
);

my $pwd = `pwd`;
chomp $pwd;
my $js = ZTab::make_js (
jslib => 'jslib/tabs',
# jslib => '<| /preview/www.dekanat.ru/jslib/tabs |>',
# base => '<| /preview/www.dekanat.ru/login.html |>',
base => 'file://'.$pwd.'/',
);


my $body_attr = ZTab::body_attr();

my $tab1 = ZTab->new();

$tab1->add_tab( tab => 'Common', content =>1 );
$tab1->add_tab( tab => 'Documents', content =>2 );
$tab1->add_tab( tab => 'Address', content =>3 );
$tab1->add_tab( tab => 'Education', content =>4 );
$tab1->add_tab( tab => 'Contract', content =>5 );
$tab1->add_tab( tab => 'Misc.', content =>'' );
$tab1->set_tab( 1, tab =>'CV', content =>'This tab replaced "Document" tab' ); # replace second tab

my $tab2 = ZTab->new();

$tab2->add_tab( tab => 'Motheboards', content => '



');
$tab2->add_tab( tab => 'Status', content => '
Good
Broken
No opinion
');

# Output =====================================================

print<

$css
$js


Using ZTab


Simple Tabs



EOT
print $tab1->get_tab(active=>3);
print "
\n";
print $tab1->get_content();

print<


Tab with form



EOT
print $tab2->get_tab();
print "
\n";
print $tab2->get_content();
print<




EOT