#! /usr/bin/perl use strict ; use warnings ; use JQuery::Demo ; package main ; my $tester = new JQuery::Demo ; $tester->run ; package JQuery::Demo ; use JQuery::Taconite ; sub start { my $my = shift ; $my->{info}{TITLE} = "Taconite Example" ; my $env ; for (sort keys %ENV) { $env .= "$_ = $ENV{$_}\n" ; } my $q = new CGI ; my $params = $q->Vars; my $par ; for (sort keys %$params) { $par .= "$_ = $params->{$_}\n" ; } my $jquery = $my->{jquery} ; JQuery::Taconite->new(id => 'ex6', remoteProgram => '/cgi-bin/jquery_taconite2.pl', rm => 'reply', addToJQuery => $jquery) ; my $html =<Demo This page demonstrates many updates at once. Text will be appended This div will be removed This one too Append radio buttons Append before this Set the attribute to green Wrap this text with a style Eval Target EOD $my->{info}{BODY} = "START OF TACONITE EXAMPLE$htmlEND OF EXAMPLE" ; } sub reply { my $my = shift ; my $result=< This span was appended to the APPEND div This span was prepended to the PREPEND div This paragraph element was inserted after the AFTER div Note that we can have multiple elements here. Any XHTML can be used! Radios follow: This span was inserted before the BEFORE div This is new content that includes a table. Header 1Header 2 row 1 col 1row 1 col 2 row 2 col 1row 2 col 2 This is new content that replaced the old content. Checkboxes follow: Thenewrow \$('#evalTarget').html("This text came from an eval command"); EOD $my->{info}{AJAX} = $result ; }
This paragraph element was inserted after the AFTER div
Radios follow:
Checkboxes follow: