By: Cavanha
Date: 2009-09-10
Time: 15:53
|
Problem IF, ELSE in HTML
Hello staff, again I need a help from you and I have a TBS Block riding a <OPTION> a <SELECT>, but when this TBS Block without this data, it mounts the <OPTION> blank, I have If no one to bring a html text within the <OPITON> more I tried all ways and not dry Consgui copdigo:
<select label='A8_iddisc' name='A8_iddisc' >
<option value='[blk_select_sa701.A3_ID;block=option]'>[blk_select_sa701.A3_DESCR;if [val] == ''; then 'text'; else [val] </option>
<option>[blk_select_sa701.A3_DESCR;if [val] != ''; then ''; else 'text']</option></select>
|
I tried to <OPTION> carrying TBS Block, as riendas can see, also tried to make a new <OPTION> only testing data, still nothing, please help a ...
|
By: Skrol29
Date: 2009-09-11
Time: 00:18
|
Re: Problem IF, ELSE in HTML
Hi Cavanha,
If you what to have a special <option> item for when there is no data, you have to use a special block section with parameter "nodata".
I've noticed in your snippet that the second <option> item has a TBS fields with no parameter "block" defined. Because of that, this field will be merged with the last record only. It is considered as out of the block.
|
By: Cavanha
Date: 2009-09-11
Time: 00:34
|
Re: Problem IF, ELSE in HTML
Hi Skrol, the second <option> was a test, you could give an example of how it would be using the first <option> where if he is correct!
|
By: Cavanha
Date: 2009-09-11
Time: 00:38
|
Re: Problem IF, ELSE in HTML
I do not know if you understand what I'm trying, but it is something like if you have no data to be shown I would like to display a message within the <select> <option> ie one with a message that has some information.
|
By: tonier
Date: 2009-09-11
Time: 08:11
|
Re: Problem IF, ELSE in HTML
Hi Cavanha, I think you need to show to user if there is no data available, isn't it?
You need to add 'nodata' like what Skrol29 said.
here the code from what I read above ...
<select label='A8_iddisc' name='A8_iddisc' >
<option value='[blk_select_sa701.A3_ID;block=option]'>[blk_select_sa701.A3_DESCR;if [val] == ''; then 'text'; else [val]]</option>
<option value='[blk_select_sa701;block=option;nodata]'>There is no data available</option>
</select>
|
Hope it help you ...
|
By: Cavanha
Date: 2009-09-11
Time: 13:16
|
Re: Problem IF, ELSE in HTML
Thanks, guys, nice work Toni, most unintentionally abuse, just for sake of learning, as would be the condition for the test this <option>? really like to know how to if no HTML! <option> below will be the only one example.
<option value='[blk_select_sa701.A3_ID;block=option]'>[blk_select_sa701.A3_DESCR;if [val] == ''; then 'text'; else [val]]</option>
|
|
|
Posting in progress.
Please wait...
|