Difference: 0LASubrConvertTextToHtml (1 vs. 2)

Revision 22012-02-10 - JeanNeron

Line: 1 to 1
 
META TOPICPARENT name="APPXRuntimeSubroutineAPI"

.CONVERT TEXT TO HTML

Line: 21 to 21
  This subroutine converts a text field to HTML encoding. The first two parameters are required, if any are missing the subroutine will CANCEL. The <html_header> and <html_footer> parameters are optional.
Changed:
<
<
<html> is the converted <text> (Required). This must be PASSed with Share "Y" to return the value.
>
>
<html> returns the converted <text> (Required). This must be PASSed with Share "Y" to return the value.
  <text> is the text data you want converted to html (Required).
Line: 29 to 29
  <html_footer> is any html code you want added to the end of <html> (Optional).
Changed:
<
<
This routine will replace any end of line characters (Go-Return) with <br> and a pair of end of line characters with <p>.
>
>
This routine will replace any end of line characters (Go-Return) with <br> and a pair of end of line characters with <p>. The symbols <, >, &, and hard spaces (underscores) will be converted to their HTML equivalents.
  If <html> is too small to contain the converted text, --- .CONVERT TEXT TO HTML will contain 'Data was truncated'.

Comments:

Revision 12012-02-03 - JeanNeron

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="APPXRuntimeSubroutineAPI"

.CONVERT TEXT TO HTML

This subroutine converts a text field to HTML encoding.


Usage:

      PASS         <html>                     FIELD            SHARE? Y
      PASS         <text>                     FIELD            SHARE? N
      PASS         <html_header>              FIELD            SHARE? N
      PASS         <html_footer>              FIELD            SHARE? N
      GOSUB    --- .CONVERT TEXT TO HTML
      *        check for errors
      IF       --- .CONVERT TEXT TO HTML      NE

Description:

This subroutine converts a text field to HTML encoding. The first two parameters are required, if any are missing the subroutine will CANCEL. The <html_header> and <html_footer> parameters are optional.

<html> is the converted <text> (Required). This must be PASSed with Share "Y" to return the value.

<text> is the text data you want converted to html (Required).

<html_header> is the html code you want inserted at the beginning of <html> (Optional). If not PASSed or blank, it will default to <HTML><BODY><FONT FACE=HALVETICA>

<html_footer> is any html code you want added to the end of <html> (Optional).

This routine will replace any end of line characters (Go-Return) with <br> and a pair of end of line characters with <p>.

If <html> is too small to contain the converted text, --- .CONVERT TEXT TO HTML will contain 'Data was truncated'.

Comments:

Read what other users have said about this page or add your own comments.


<--/commentPlugin-->

-- JeanNeron - 2012-02-03

 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback