Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to display data in a dialog box
    text
    copied!<p>I want to display datain a dialog box. I get this data from database and pass this data into table inside a div and display using jQuery. The table consist on 3 columns and 6 rows. The first row in the first column should be rowspan = 6, but this doesn't work form me( I need this to put thhe picture of the person, the image i should get from database and has an unique id). other columns are like below:</p> <pre><code> \$(document).ready(function(){ \$('.btn').click(function(){ \$("#dialog").dialog(); return false; }); </code></pre> <p>&lt;--div--></p> <pre><code>print $q-&gt;div({-id =&gt;'dialog', -title =&gt; 'Profile', -style =&gt; 'display:none'}, print $q-&gt;start_table({-id =&gt; 'id_tab', cellpadding=&gt;10}, $q-&gt;Tr([ $q-&gt;td([ $q-&gt;input({ -rowspan =&gt; '5', -value =&gt;'', -type =&gt; 'text'}), $q-&gt;input({ -value =&gt;'Name:', -type =&gt; 'text'}), $q-&gt;input({ -value =&gt;' ', -type =&gt; 'label'}), ]), ]), $q-&gt;Tr([ $q-&gt;td([ $q-&gt;input({ -value =&gt;'Surname:', -type =&gt; 'text'}), $q-&gt;input({ -value =&gt;' ', -type =&gt; 'label'}), ]), ]), $q-&gt;Tr([ $q-&gt;td([ $q-&gt;input({ -value =&gt;'Gender:', -type =&gt; 'text'}), $q-&gt;input({ -value =&gt;' ', -type =&gt; 'label'}), ]), ]), $q-&gt;Tr([ $q-&gt;td([ $q-&gt;input({ -value =&gt;'Position:', -type =&gt; 'text'}), $q-&gt;input({ -value =&gt;' ', -type =&gt; 'label'}), ]), ]), $q-&gt;Tr([ $q-&gt;td([ $q-&gt;input({ -value =&gt;'Department:', -type =&gt; 'text'}), $q-&gt;input({ -value =&gt;' ', -type =&gt; 'label'}), ]), ]), $q-&gt;Tr([ $q-&gt;td([ $q-&gt;input({ -value =&gt;'Pershkrimi:', -type =&gt; 'text'}), ]), ]), ); </code></pre> <p>print $q->end_table;</p> <p>&lt;---data that i get from database---></p> <pre><code> my $cRowId = $aArray-&gt;[$i]-&gt;{'ID'}; my $bt3 = $q-&gt;image_button({-src =&gt; '/media/images/edit_1.png', -class =&gt; 'btn', -title =&gt; 'btn', -name =&gt; 'btn3', -value =&gt; $aArray-&gt;[$i]-&gt;{'ID'}, -id =&gt; $cRowId, }); push @aRows, ($q-&gt;Tr($q-&gt;td([$bt3, $q-&gt;label({-id =&gt; "name_$cRowId"}, $aArray-&gt;[$i]-&gt;{'Name'}), $q-&gt;label({-id =&gt; "name_$cRowId"}, $aArray-&gt;[$i]-&gt;{'Surname'}), $q-&gt;label({-id =&gt; "gender_$cRowId"}, $aArray-&gt;[$i]-&gt;{'Gender'}), $q-&gt;label({-id =&gt; "position_$cRowId"}, $aArray-&gt;[$i]-&gt;{'Position'}), $q-&gt;label({-id =&gt; "department_$cRowId"}, $aArray-&gt;[$i]-&gt;{'Dep'}), ]))); } </code></pre> <p>But firstly i want to display them in the dialog box. Until now the dialog box is empty. I really need some help. Thank you</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload