Short Description
|
Line Breaks in TEIF causing spacing problems
|
Entered
|
By:
Michael - Charleston
When: 1998-10-29 08:57:40 Build: 1.03.07A
|
Categories
|
Type:
Question
Department: Product
Category:
DevCenter SurferScript Generation
|
Description
|
I've got the following statement in my template (note the in the last TEIF I even tried putting the comma outside TESHOW):
>TESHOW TextTrim(Screen(7,10,59))<
>TEIF Screen(8,10,1)!=" "<
>TESHOW ", " + TextTrim(Screen(8,10,30))<
>/TEIF<
>TEIF Screen(8,41,1)!=" "<
>TESHOW ", " + TextTrim(Screen(8,41,20))<
>/TEIF<
>TEIF Screen(8,62,1)!=" "<
, >TESHOW TextTrim(Screen(8,62,8))<
>/TEIF<
The HTML line that displays in the browser is something like:
Smith, John , 1 Main St , Charleston , SC
I believe the unwanted extra space in front of the comma is happeneing because the Screensurfer compiler is throwing the results of each TEIF statment on a new line so the source HTML looks like this:
Smith
, John
, 1 Main St
, Chareleston
, SC
So how do I get rid of the extra spaces?
|
|
Append
|
By: Michael - Charleston When: 1998-10-29 09:08:35 New Status:
Pending IE
|
Comment
|
Oops, messed up my tag delimiters - it should be:
<TESHOW TextTrim(Screen(7,10,59))>
<BR>
<TEIF Screen(8,10,1)!=" ">
<BR>
<TESHOW ", " + TextTrim(Screen(8,10,30))>
<BR>
</TEIF>
<BR>
<TEIF Screen(8,41,1)!=" ">
<BR>
<TESHOW ", " + TextTrim(Screen(8,41,20))>
<BR>
</TEIF>
<BR>
<TEIF Screen(8,62,1)!=" ">
<BR>
, <TESHOW TextTrim(Screen(8,62,8))>
<BR>
</TEIF>
I also tried putting all the TEIF statements on one line - that choked the compiler with a "no matching /TEIFs" error. And I tired nesting the TEIFs but had the same HTML output.
|
|
Append
|
By: Michael - Charleston When: 1998-10-29 09:10:03 New Status:
Pending IE
|
Comment
|
I'll get it yet:
<TESHOW TextTrim(Screen(7,10,59))>
<TEIF Screen(8,10,1)!=" ">
<TESHOW ", " + TextTrim(Screen(8,10,30))>
</TEIF>
<TEIF Screen(8,41,1)!=" ">
<TESHOW ", " + TextTrim(Screen(8,41,20))>
</TEIF>
<TEIF Screen(8,62,1)!=" ">
, <TESHOW TextTrim(Screen(8,62,8))>
</TEIF>
|
|
Append
|
By: WindSurfer When: 1998-10-29 09:53:22 New Status:
Pending Customer
|
Comment
|
Thanks for all the work on making it appear nicely--don't worry in the future, as we have a special editor we use to fix-up examples. One of these days we will provide integrated "sample fixing" in the SupportCenter, maybe keyed-off of the <PRE> tag.
Anyway, answer is the new tag which you may not have documented, but is probably in your build (if not, latest build is at ftp://ftp.ieinc2.com/pub/surfer/t1_3_27a.zip).
This is, <TENOTEXT> to open a "no text in stream" block, and </TENOTEXT> to close the block. Inside a TENOTEXT block, only HTML created with a Screensurfer tag (including TESHOW) will be streamed-out to the browser.
Just bracket your TEIF areas with the TENOTEXT and it should fix your problem.
|
|