Hi! I am making a dialog box where i display data about a person. Until now i can dispaly Name, surname and Gender. THis are values that are even displayed in the main table from where i click the button for each person and display dialog box. What i want to do is to display even the image that is a field in database . But i dont know how to do. Please i need some help. Here is the code:

<--jquery-->
Code:
\$(document).ready(function(){
           
      \$('.btn').click(function(){
                                         
            \$('#name').val(\$("#name_" + rowid).text());
            \$('#surnm').val(\$("#surname_" + rowid).text());
            \$("#gender").val(\$("#gender_" + rowid).text());                  
            
         \$("#dialog").dialog();
         
         return false;
      });      
}
<--div-->
Code:
print $q->div({-id =>'dialog', -title => 'Profile', -style => 'display:none'},
         
        $q->table({-id => 'id_tab'},
        $q->Tr([  $q->td({ -rowspan => "6" -value =>'',  -id => 'img'})]),
        $q->Tr([ $q->td([
                                    
                  $q->input({ -value =>'Name:', -type => 'text', -readonly => 'readonly'}),              
                  $q->input({ -value =>' \$("#dep").val(\$("#dep_" + rowid).text());', -type => 'label', -id => 'name', -readonly => 'readonly'}),  
                  ]),               
         ]),
         $q->Tr([ 
                 $q->td([                               
                  $q->input({ -value =>'Surname:', -type => 'text', -readonly => 'readonly'}),              
                  $q->input({ -value =>'', -type => 'label',-id => 'surnm', -readonly => 'readonly'}),  
                  ]),
         ]),
          $q->Tr([ 
                $q->td([                           
                  $q->input({ -value =>'Gender:', -type => 'text', -readonly => 'readonly'}),               
                  $q->input({ -value =>'', -type => 'label', -id => 'gender', -readonly => 'readonly'}),  
                  ]),                  
         ]),
          
    )     
);
<--data that i get from database-->

Code:
for my $i ( 0 .. $#$aArray ) { 	  
    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 => "surname_$cRowId"}, $aArray->[$i]->{'surname'}),
   $q->label({-id => "gender_$cRowId"}, $aArray->[$i]->{'Gender'}),   
 ));
 print $q->table({-style => 'border-color:lightblue', -border => '1px solid green', -align =>'center',  -width => '100%', -id => 'id_table'},
   thead($q->th(['Image','Name', 'Surname'])),
   @aRows );
So what i want to do is to get the image from database not to display it in the first table but just when click the button that open the dialog box