Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Problems with HTML code

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Problems with HTML code
 Login/Join
 
<user198>
posted
Hello,

i also have a problem with my html-code because the &TNEU is not completed, as you can see below.
Perhaps you know why?
Is the statement to long?

Thanks,
Katy

My fex:

TABLE FILE wg_kd_betreuung
-SET &C=1;
-SET &TNEU=' ';
-IF &Team0.EXISTS THEN GOTO LOOP2 ELSE GOTO DONEALL;
-LOOP2
-SET &TNEU= '<input name="Team" value="&Team" type="hidden">';
-IF &Team0.EXISTS NE 1 THEN GOTO NOARRAY;
-REPEAT NOARRAY FOR &C FROM 2 TO &Team0;
-SET &TNEU = &TNEU | ' <input name="Team" value="&Team.&C" type="hidden">';
-NOARRAY
-GOTO ALLESDONE
-DONEALL
-IF &Team.EXISTS EQ 1 THEN GOTO STEP2 ELSE GOTO ALLREADY;
-STEP2
-SET &TNEU= '<input name="Team" value="&Team" type="hidden">';
-ALLREADY
-ALLESDONE
END
...
<input name="KZ" value="AT" type="hidden">
<input name="k" value="AU" type="hidden">
&TNEU.EVAL
<input name="FMT" value="PDF" type="hidden">
<input name="Submit" value="PDF-Format" type="submit" class="button"></td>
...

My html page produces the follwing:

<input name="KZ" value="AT" type="hidden">

<input name="k" value="AU" type="hidden">

<input name="Team" value="LAX WG3/U" type="hidden"> <input name="Team" value="MNL WG32/M" type="

<input name="FMT" value="PDF" type="hidden">

<input name="Submit" value="PDF-Format" type="submit" class="button"></td>
 
Report This Post
Expert
posted Hide Post
yeah this happens a lot.
makes me crazy. i switched to servlet from isapi for some of my complicated html-written output, and that worked in some cases, but what you need to do is simpler, just break up your code lines
-SET &TNEU2 = ' <input name="Team" value="&Team.&C" type="hidden">';
..then write it out
&TNEU.EVAL
&TNEU2.EVAL

and you have to be cheeky how you break up your code; sometimes a linebreak gets stuck in there and its hard to get out, so you break up your code NOT at the tag level, but within the tag.
eg; not '<...>'
but rather
'<input name="kz" '
and then the next var is the end of the tag
' value="AT" type="hidden">'
Just hammer away and you'll get it to work.
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Expert
posted Hide Post
Katy,

The point in your code that concerns me is that you will have more than one hidden INPUT named "Team".
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
<user198>
posted
Yes, this is what I want. Via a button I launch another fex. In my form action... I have to pass multiple teams. This is why I have a loop and there I want to produce something like this:

<input name="Team" value="Team1" type="hidden">
<input name="Team" value="Team2" type="hidden">
<input name="Team" value="Team3" type="hidden">
<input name="Team" value="Team4" type="hidden">

But at the moment I have a break in the HTML-code like:
<input name="Team" value="LAX WG3/U" type="hidden"> <input name="Team" value="MNL WG32/M" type="

I have tried the solution of Susannah but it makes no sence with my loop.

Do you now understand what I mean?
 
Report This Post
will give you what you want.

This message has been edited. Last edited by: <Maryellen>,



Expert
posted Hide Post
Katy,


Why not move the loop into the HTML and deal with the generation of the HTML directly?

Using -



-SET &C=1;

-IF &Team0.EXISTS THEN GOTO LOOP2 ELSE GOTO DONEALL;
-LOOP2
-IF &Team0.EXISTS NE 1 THEN GOTO NOARRAY;
-REPEAT NOARRAY FOR &C FROM 2 TO &Team0;

-NOARRAY
-GOTO ALLESDONE
-DONEALL
-IF &Team.EXISTS EQ 1 THEN GOTO STEP2 ELSE GOTO ALLREADY;
-STEP2
-ALLREADY
-ALLESDONE

In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Expert
posted Hide Post
yes, thats a great idea. tony's suggestion works really well.
embedding dialog manager into html output is something you don't read about in any manual i don't think, its just something you try one day and say 'cool' when it works!
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Master
posted Hide Post
Greetings,

A while back, I was curious if I could embed Dialogue Manager commands within the -HTMLFORM commands.

In my research I found this case on the IB Website:

quote:

Case: 81051065 Product: WebFOCUS Release: 4.3 4.3.6 Primary OS: UNIX Date: 03/04/16
Case information refers to the Product, Release, and OS for which this question was asked.
The solution may apply to other Products, Releases, and Operating Systems.

Problem:

Can Dialogue Manager commands be used in HTMLFORM section of a Focexec?


Solution:

It is -NOT- possible to use Dialogue Manager commands in the HTMLFORM section
of a Focexec. This is do to the fact that the code between the HTMLFORM tags
does not parse FOCUS code, but only looks for !IBI.FIL.xxx; and !IBI.AMP.xxx;


Product: WebFOCUS, WEBFOCUS
I decided to check with the website, since the manual (WebFOCUS Developing Reporting Applications) did not seem to be too clear on this topic one way or another.

I opened my own case with the IB Helpdesk, and they agreed with case I found, and suggest that I did not code DM commands within -HTMLFORM.

Regards,
Dave
 
Posts: 822 | Registered: April 23, 2003Report This Post
Expert
posted Hide Post
In fact, the code has been tightened between 5.2 and 5.3 and this is how you're supposed to code DM in HTMLFORM:

-HTMLFORM BEGIN
...
<input name="KZ" value="AT" type="hidden">
<input name="k" value="AU" type="hidden">
-HTMLFORM END
-SET &C=1;
-HTMLFORM BEGIN
<input name="Team" value="!IBI.AMP.Team;" type="hidden">
-HTMLFORM END
-IF &Team0.EXISTS THEN GOTO LOOP2 ELSE GOTO DONEALL;
-LOOP2
-IF &Team0.EXISTS NE 1 THEN GOTO NOARRAY;
-REPEAT NOARRAY FOR &C FROM 2 TO &Team0;
-SET &TeamX = &Team.&C;
-HTMLFORM BEGIN
<input name="Team" value="!IBI.AMP.TeamX;" type="hidden">
-HTMLFORM END
-NOARRAY
-GOTO ALLESDONE
-DONEALL
-IF &Team.EXISTS EQ 1 THEN GOTO STEP2 ELSE GOTO ALLREADY;
-STEP2
-ALLREADY
-ALLESDONE
-HTMLFORM BEGIN
<input name="FMT" value="PDF" type="hidden">
<input name="Submit" value="PDF-Format" type="submit" class="button"></td>
...
-HTMLFORM END
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
Is multiple htmlform begin/end sequences (allowing interspersed DM) documented as a supported feature?

In a much earlier WF release I built an app using precisely that structure -- only to have it break one release later: only the first -HTMLFORM chunk would make it to the html output.
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Silver Member
posted Hide Post
Katy, I have had this occur on many occasions, and I find that I need an escape character (the concatenation bar) after the & or else it treats it like an amper variable without any value. - just try this -
-SET &TNEU= '<input name="Team" value="&|Team" type="hidden">';
 
Posts: 37 | Registered: April 14, 2003Report This Post
<user198>
posted
Tony,

your idea works really great!
Thanks a lot!

Katy
 
Report This Post

...For me, the use of IBI.AMP.TNEU; gives the full HTML but the &TNEU.EVAL drops the last char ">" off of the string even though the HTML functions OK.

Tony

This message has been edited. Last edited by: <Maryellen>,



Expert
posted Hide Post
Hi Katy,


I'm pleased that you have managed to get your proc to work. Well done.

The only thing I would advise is that, as Jack and David have mentioned, you need to be aware that this type of code may function now but may not in future releases - if it is unsupported code.

That said, I've not had problems with this type of coding in the releases I've used recently (5.2.3, 5.3.2 and 7.1 - all on windows).

One other possibility that has not been mentioned (apart from Francis), is the use of the IBI HTML variable direct in your code -

...


!IBI.AMP.TNEU;

In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
<user198>
posted
Thank you all for your advises!
I will consider this point.

Katy
 
Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Problems with HTML code

Copyright © 1996-2020 Information Builders