Focal Point
[CLOSED] HOW TO EMBED HTML TAGS

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/500109904

April 02, 2010, 08:00 AM
WebGuy0212
[CLOSED] HOW TO EMBED HTML TAGS
I'm new to WebFocus and to this forum so please bare with me. What is the correct way to embed html tags into WebFocus procedures i.e. headers or footers. I tried doing something like the following code but I keep getting this error -> "(FOC406) THE FIELDNAME IS NOT RECOGNIZED: A"

This is an example of what I'm trying...

-SET &LINK =
'<a href="somepage.html">Link</a>';


TABLEF FILE AWTAP_WF_EDP_STATUS
PRINT
'COL1'
'COL2'
'COL3'
HEADING
"Workforce EDP Status Report"
" &LINK "
FOOTING

This message has been edited. Last edited by: Kerry,
April 02, 2010, 08:24 AM
Tom Flynn
WG,

Don't know what you are trying to do, probably a link to a HTM program on the server, but, a SEARCH on href may help:

  
DEFINE FILE CAR
   LINK/A100 = '<a href="http://www.google.com">Google</a>';
END
TABLE FILE CAR
PRINT
   RETAIL_COST DEALER_COST
BY COUNTRY
BY CAR
HEADING
"Workforce EDP Status Report"
"<LINK"
" "
END
-EXIT



Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
April 02, 2010, 09:27 AM
WebGuy0212
Can I use a variable to store the html or does it have to be stored as a "DEFINE Field"?
April 02, 2010, 06:19 PM
Dan Satchell
quote:
Can I use a variable to store the html or does it have to be stored as a "DEFINE Field"?


May be impossible to do with a variable because of the special meaning of both the left caret and ampersand in WebFOCUS. Besides the DEFINE solution, you can also use the StyleSheet.

TABLE FILE CAR
 PRINT RETAIL_COST DEALER_COST
 BY COUNTRY
 BY CAR
 HEADING
  "Workforce EDP Status Report"
  "Google"
  " "
 ON TABLE SET STYLE *
  TYPE=HEADING, LINE=2, URL='http://www.google.com', $
 ENDSTYLE
END



WebFOCUS 7.7.05