Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Problems with HTML code
Go
New
Search
Notify
Tools
Reply
  
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>
 
Reply With QuoteReport 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, 2003Reply With QuoteReport 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, 2004Reply With QuoteReport 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?
 
Reply With QuoteReport 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, 2004Reply With QuoteReport 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, 2003Reply With QuoteReport 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: 817 | Registered: April 23, 2003Reply With QuoteReport 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, 2005Reply With QuoteReport 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, 2005Reply With QuoteReport 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, 2003Reply With QuoteReport This Post
<user198>
posted
Tony,

your idea works really great!
Thanks a lot!

Katy
 
Reply With QuoteReport 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, 2004Reply With QuoteReport This Post
<user198>
posted
Thank you all for your advises!
I will consider this point.

Katy
 
Reply With QuoteReport This Post
  Powered by Social Strata  
 

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

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.