Categories > TinyButStrong general >

out contain '' ''

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: ashok
Date: 2009-08-14
Time: 13:54

out contain '' ''

hi
i am useing below code.
<table id="disp_accounts">
    <tr>
        <th width="300px">Account </th><th width="90px">Current Balance</th><th width="90px">Credit<br />Limit</th><th width="90px">Close<br />Account</th><th width="100px">Miss<br />Payment</th><th width="90px">Transfer<br />Balance</th></tr>
    [onshow;if [var.open]==1; then  '<tr>
        <td class="disp_name">[disp_name.val;block=tr;htmlconv=no]</td>
        <td align="center" class="disp_balance">$[disp_balance.val;block=tr;htmlconv=no]</td>
        <td align="center" class="disp_amount">$[disp_amount.val;block=tr;htmlconv=no]</td>
        <td align="center" class="disp_close">[disp_close.val;block=tr;htmlconv=no]</td>
        <td align="center" class="disp_misspayment">[disp_misspayment.val;block=tr;htmlconv=no]</td>
        <td align="center" class="disp_transfer">[disp_transfer.val;block=tr;htmlconv=no]</td>
        <td class="disp_id">[disp_id.val;block=tr;htmlconv=no]</td>
        <td class="disp_account_balance" style="display:none;">[account_balance.val;block=tr;htmlconv=no]</td>
    </tr>';
    else
    ''
    ]

    [onshow;if [var.close]==1; then '<tr>
        <td>[disp_namec.val;block=tr;htmlconv=no]</td>
        <td align="center">$[disp_balancec.val;block=tr;htmlconv=no]</td>
        <td align="center">$[disp_amountc.val;block=tr;htmlconv=no]</td>
        <td align="center">[disp_closec.val;block=tr;htmlconv=no]</td>
        <td align="center">[disp_misspaymentc.val;block=tr;htmlconv=no]</td>
        <td align="center">[disp_transferc.val;block=tr;htmlconv=no]</td>
    </tr>';
    else
    ''
    ]
</table>
when condition is true then out put contain '' '' . how to remove it. please tell me where i am wrong in TSB system.
By: Skrol29
Date: 2009-08-17
Time: 13:53

Re: out contain '' ''

Hi Ashok,

I've tested your snippet and its working ok with me. (TBS 3.4.0)
You can make your code more easy to read by coding:
  <tr>
    <td class="disp_name">[onload;block=tr;when [var.open]==1][disp_name.val;block=tr;htmlconv=no]</td>
    <td align="center" class="disp_balance">$[disp_balance.val;block=tr;htmlconv=no]</td>
    <td align="center" class="disp_amount">$[disp_amount.val;block=tr;htmlconv=no]</td>
    <td align="center" class="disp_close">[disp_close.val;block=tr;htmlconv=no]</td>
    <td align="center" class="disp_misspayment">[disp_misspayment.val;block=tr;htmlconv=no]</td>
    <td align="center" class="disp_transfer">[disp_transfer.val;block=tr;htmlconv=no]</td>
    <td class="disp_id">[disp_id.val;block=tr;htmlconv=no]</td>
    <td class="disp_account_balance" style="display:none;">[account_balance.val;block=tr;htmlconv=no]</td>
  </tr>
  <tr>
    <td>[onload;block=tr;when [var.close]==1][disp_namec.val;block=tr;htmlconv=no]</td>
    <td align="center">$[disp_balancec.val;block=tr;htmlconv=no]</td>
    <td align="center">$[disp_amountc.val;block=tr;htmlconv=no]</td>
    <td align="center">[disp_closec.val;block=tr;htmlconv=no]</td>
    <td align="center">[disp_misspaymentc.val;block=tr;htmlconv=no]</td>
    <td align="center">[disp_transferc.val;block=tr;htmlconv=no]</td>
  </tr>


It is also strange that you have several blocks defines with "block=tr" on the same <tr>. And cannot understand what is the expected result. If only one of this block (disp_name, disp_balance, disp_amount, disp_close, disp_misspayment, disp_transfer or disp_id) is empty then all the table will be empty.

I hope that helps,