Categories > TinyButStrong general >

onshow leaving empty div

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Maz
Date: 2006-05-23
Time: 23:12

onshow leaving empty div

I'm not sure if this is by design or not, but I'm sure that version prior to 3.0 didn't act the same way.

I have:

            <p id="success">[var.success_msg;magnet=p;noerr]</p>
            <div>[onshow;block=div;when [account_locked;noerr]=0]
            [var.has_errors;noerr;if [val]!='';then '
            <p id="failure">[var.lang.err_please_fix]</p>
            [err_msg;block=begin][onshow;when [err_msg;noerr]!='']
            <p class="errortext">[err_msg.val;magnet=p;htmlconv=no]</p>
            [err_msg;block=end]']
            </div>

In previous versions of TBS, if the [onshow;block=div;when [account_locked;noerr]=0] was not 0 then the entire div would not be shown, including the <div></div> tags.

Now, however, it appears to leave empty <div></div> which causes me HTML Validation warnings.

Am I missing something, or is this by design in 3.0+
By: Skrol29
Date: 2006-05-24
Time: 01:16

Re: onshow leaving empty div

Hi Maz,

This should not happen.
I've tried your snippet as is and all run ok for me. (TBS 3.0.5)

Take care that
[err_msg;noerr]!=''
is placed inside a couple of (') so you should escape the quotes.