Categories > TinyButStrong general >

searching a string with in string

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: leeladharan
Date: 2005-04-19
Time: 10:18

searching a string with in string

Is there any way in tbs to get the extensions of 'file names' coming from dbase to use it in html for comparison based on which <img> or <a>
tags can be set.
suppose file = "xxx.jpg"

if(filename extension == "jpg")
{ <img>
}
else
{
<a>
}
By: Skrol29
Date: 2005-04-19
Time: 10:49

Re: searching a string with in string

In order to display and image or an anchor, you can use a conditional block like [onload] or [onshow]. To check the condition, you can use a calculated variable that return 0 or 1 depending to the exention of the file, or you can use a custom function that does the same and wich is called by the TBS fields using parameter 'onformat'.