Ticket #248 ( Closed )

Short Description TELOOP/AS CLICKABLE JavaScript= bug?
Entered By: PeteL When: 1999-01-29 07:11:08 Build: 1.03.28
Categories Type: Problem   Department: Product   Category: HTML Generation
I just noticed something very strange - I have a section which uses identical code within a loop and then outside the loop, and it generates correctly outside the loop, but incorrectly within the loop.

<TELOOP rowCount First=10 Last=18 Step=2>
 <TEAREA rowCount 1 rowCount 46>
 <TEAREA rowCount 47 rowCount 66 AS CLICKABLE
 <TEAREA rowCount 67 rowCount 80>
<TEAREA 19 1 20 80>

the above code generates

<A HREF="JAVASCRIPT:equa(766)">


  <TEAREA 21 23 21 26 AS CLICKABLE

 <A HREF="JAVASCRIPT:equalPlace=102;putEqualSign(1622)">

as it should. I'll send the whole template via email. I tried the FixSampleCode button, but there are no PRE tags, so it didn't do anything - hope this formats OK.

Append By: PeteL  When: 1999-01-29 07:11:56  New Status: Pending IE
Comment obviously it didn't - can you fix it?
Append By: WindSurfer  When: 1999-01-29 08:52:35  New Status: Pending Customer
Comment I fixed it--also added use of the <TENOTEXT> tag, which looks like something you can really use here. The TENOTEXT tag will prevent all non-TEtag-generated text from appearing on the page, enabling you to structure your code in a more understandable way while not worrying about extra carriage returns in a PRE block.

When you do want a carriage return, you do a <TESHOW "\n"> or append the "\n" to a text string at the point you want the end of a screen line.

I suspect that there is some weird maximum line length issue going with the javascript getting chopped-- try my example with the TENOTEXT and see if it successfully works-around the problem.

Append By: PeteL  When: 1999-01-29 09:26:56  New Status: Pending IE
Comment Not sure I comprehend the TENOTEXT - in the above example, how/where will line-breaks be generated in the loop? And what exactly does it suppress and from where?
Append By: WindSurfer  When: 1999-01-29 12:48:59  New Status: Pending Customer
Comment The TENOTEXT tag will suppress ALL text in the outbound stream except that generated by a SurferScript tag, such as TEAREA. No blanks, line breaks or anything--you switch to using a TESHOW for all "simple" text when inside a TENOTEXT block.

What this means is that inside a PRE tag, you no longer need to worry about where your line breaks are when using logic in SurferScript. This enables you to format your logic "as you like it".

The thing is, when you DO want a line break, you need to output it using an escaped-linebreak, which is the \n (backslash-n).

Append By: PeteL  When: 1999-01-29 13:03:03  New Status: Pending IE
Comment think it might be easier to just add a new tag <TEBREAK>? This way, if you're not already sending a quoted text string, you don't have to write out the whole
<TESHOW "/n"> - not much simpler, but a little.

what build was TENOTEXT added?

Append By: PeteL  When: 1999-01-29 13:04:11  New Status: Pending IE
Comment &^%@#$^ - forgot to fix the left-angle-bracket again in last update - that should have said "add a new tag <TEBREAK>"
Append By: WindSurfer  When: 1999-01-29 13:23:37  New Status: Pending Customer
Comment Fixed--TENOTEXT was added a couple of months ago, then was made fully robust in 1.3.28.

Don't worry, it wasn't around when you had to make all your screens look right and also needed to comply with the TEIF line-ending rule...sorry that it wasn't...

Should be in latest documentation too...

Append By: PeteL  When: 1999-02-02 06:51:57  New Status: Pending IE
Comment I noticed that this was Waiting Customer, and wanted to make sure it was going to get looked at - whether or not TENOTEXT works around this problem, I have no way to know where else it might be broken, so a single-screen workaround is of very little value. I just happened to stumble on this particular situation myself, I have no idea if users are experiencing problems elsewhere. I'm also quite sure this used to work, so I would be interested to know when it broke, especially since I'm trying to implement new ielua into production very soon, and don't want to break anything else.


Append By: PeteL  When: 1999-02-02 07:16:43  New Status: Pending IE
Comment a further note - I could well be doing something wrong, but the TENOTEXT is definitely not working as designed for me - the </TENOTEXT> is not working, nor are any of the newline characters generated by <TESHOW "\n">. It's just one big jumble of stuff.
Append By: PeteL  When: 1999-02-02 07:20:39  New Status: Pending IE
Comment AHA! it may have been implied, but not well enought to get through my thick head - the <TENOTEXT> apparently must be within a <PRE> tag in order to function correctly - when it is outside, it's a mess.

So now I have that working, but the original problem is still exactly the same. No progress.

Append By: WindSurfer  When: 1999-02-02 09:39:22  New Status: Pending Customer
Comment Well, what is probably happening is that your PRE tag is getting lost inside a TENOTEXT because...it's text!

You need to do <TESHOW "<pre>"> to have the PRE show inside a TENOTEXT...meanwhile, we will try to reproduce, as it looks pretty simple.

Append By: PeteL  When: 1999-02-02 12:40:54  New Status: Pending IE
Comment i was just playing to see how often that new error message (just emailed) is showing up, and lo-and-behold, I found this exact problem on another screen - same thing, AS CLICKABLE JavaScript= within a TELOOP, winds up with just the first four characters within the quotes followed by the cursor position within parens. e.g.

AS CLICKABLE javascript="parm='tran,CURSOR_AND_ENTER';fieldClick"

shows up as

<A HREF="JAVASCRIPT:parm(565)"

This is quite serious, as there are probably many more locations where this will be broken.

Append By: PeteL  When: 1999-02-02 12:50:48  New Status: Pending IE
Comment fyi, this does NOT happen in my production environment
Append By: WindSurfer  When: 1999-02-02 12:51:34  New Status: Pending Customer
Comment We have reproduced this error and expect to have a fix for you tomorrow for it.

It actually is not related to the TELOOP, but is generally an error that can or cannot happen depending on circumstance, and inside the TELOOP seemed to promote it.

Append By: PeteL  When: 1999-02-02 13:02:16  New Status: Pending IE
Comment thank you! please update this record when new code is ready so I'll get an email.
Append By: PeteL  When: 1999-02-18 09:47:02  New Status: Closed
Comment all fixed - thanks