Not able to write less than (<) in defined field
Not able to write less than (<) in defined field
(OP)
DEFINE TABLE TEST
TAGA/A100 = '<option>';
TAGB/A100 = 'option>';
END
TABLE FILE TEST
PRINT TAGA
TAGB
END
-RUN
The results for TAGA is blank and for TAGB is option>
Seems like when focus sees '<' it just ignore the rest of the string entirely. Anyone knows how to include the '<' sign in the defined field? I'm on WebFocus 761. Thanks.
TAGA/A100 = '<option>';
TAGB/A100 = 'option>';
END
TABLE FILE TEST
PRINT TAGA
TAGB
END
-RUN
The results for TAGA is blank and for TAGB is option>
Seems like when focus sees '<' it just ignore the rest of the string entirely. Anyone knows how to include the '<' sign in the defined field? I'm on WebFocus 761. Thanks.
RE: Not able to write less than (<) in defined field
DEFINE FILE SCO_PROCESSES
D_PRID/A10 = TRIM('B',FTOA(PROCESSES_ID,'(F10)',D_PRID),10,' ',1,'A10');
D_DESC/A100 = '<option value="'||D_PRID||'">'||PRO_CODE||'</option>';
END
TABLE FILE SCO_PROCESSES
PRINT
D_DESC
BY PRO_CODE NOPRINT
ON TABLE HOLD AS HTMP0001 FORMAT ALPHA
END
-HTMLFORM BEGIN
<html>
<body>
<select name="INT_PROC">
<option selected value="FOC_NONE">TODOS</option>
!IBI.FIL.HTMP0001;
</select>
</body>
</html>
RE: Not able to write less than (<) in defined field
In WebFOCUS, when you don't specify an output format, the default is HTML. In this case, the '<option>' is interpreted by the BROWSER as a browser control, not data (right click on the output and select 'view source' and you can see it IS in the output), and the browser, since there's no data left, displays blanks. People use this technique to put 'custom' HTML controls into their output.
If you WANT all data to be URL encoded, so the browser will NOT think it's browser control, then issue the following first:
SET HTMLENCODE=ON
And ALL data will be encoded so it shows in the browser.