perl - Integrate data table Jquery ui into myycode -
i want integrate table style code. http://www.codeproject.com/articles/277576/ajax-based-crud-tables-using-asp-net-mvc-3-and-jta example in asp.net mvc3 , dont know how in perl code
my @arows; $aarray = db::select({ table => 'students', condition => { } }); $i ( 0 .. $#$aarray ) { $crowid = $q->hidden('rowid', $aarray->[$i]->{'id'}); $bt1 = $q->image_button({-src => '/media/images/delete_1.png', -class => 'del', -title => 'delete', -name => 'delete', -value => $aarray->[$i]->{'id'}, $bt2 = $q->image_button({-src => '/media/images/edit_1.png', -class => 'upd', -title => 'update', -name => 'update', -value => $aarray->[$i]->{'id'}, }); push @arows, ($crowid, $q->tr($q->td([$aarray->[$i]->{'name'}, $aarray->[$i]->{'surname'},$aarray->[$i]->{'age'}]))); } print $q->table({-border => '1px solid green',-align =>'center', -width => '100%', -id => 'id_table'}, thead($q->th(['name', 'surname', 'age'])), @arows, ); print $q->submit({-type => 'submit', -id => 'submit_btn', -value => 'load'}); #print $q->input({-type => 'button', -class => 'button', -onclick => "window.location.href='insert.pl';", -value => 'add'}); print $q->end_form; print $q->end_html;
Comments
Post a Comment