我想在datain中显示一个对话框。我从数据库中获取此数据并将此数据传递到div中的表中并使用jQuery显示。该表包含3列和6行。第一列中的第一行应该是rowspan = 6,但这不适用于我(我需要这个来放置人物的图片,我应该从数据库获取的图像并且具有唯一的ID)。其他栏目如下:
\$(document).ready(function(){
\$('.btn').click(function(){
\$("#dialog").dialog();
return false;
});
< - DIV - >
print $q->div({-id =>'dialog', -title => 'Profile', -style => 'display:none'},
print $q->start_table({-id => 'id_tab', cellpadding=>10},
$q->Tr([ $q->td([
$q->input({ -rowspan => '5', -value =>'', -type => 'text'}),
$q->input({ -value =>'Name:', -type => 'text'}),
$q->input({ -value =>' ', -type => 'label'}),
]),
]),
$q->Tr([
$q->td([
$q->input({ -value =>'Surname:', -type => 'text'}),
$q->input({ -value =>' ', -type => 'label'}),
]),
]),
$q->Tr([
$q->td([
$q->input({ -value =>'Gender:', -type => 'text'}),
$q->input({ -value =>' ', -type => 'label'}),
]),
]),
$q->Tr([
$q->td([
$q->input({ -value =>'Position:', -type => 'text'}),
$q->input({ -value =>' ', -type => 'label'}),
]),
]),
$q->Tr([
$q->td([
$q->input({ -value =>'Department:', -type => 'text'}),
$q->input({ -value =>' ', -type => 'label'}),
]),
]),
$q->Tr([
$q->td([
$q->input({ -value =>'Pershkrimi:', -type => 'text'}),
]),
]),
);
打印$ q-> end_table;
< ---我从数据库获得的数据--->
my $cRowId = $aArray->[$i]->{'ID'};
my $bt3 = $q->image_button({-src => '/media/images/edit_1.png',
-class => 'btn',
-title => 'btn',
-name => 'btn3',
-value => $aArray->[$i]->{'ID'},
-id => $cRowId,
});
push @aRows, ($q->Tr($q->td([$bt3,
$q->label({-id => "name_$cRowId"}, $aArray->[$i]->{'Name'}),
$q->label({-id => "name_$cRowId"}, $aArray->[$i]->{'Surname'}),
$q->label({-id => "gender_$cRowId"}, $aArray->[$i]->{'Gender'}),
$q->label({-id => "position_$cRowId"}, $aArray->[$i]->{'Position'}),
$q->label({-id => "department_$cRowId"}, $aArray->[$i]->{'Dep'}),
])));
}
但首先我要在对话框中显示它们。到目前为止,对话框为空。我真的需要一些帮助。谢谢