Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- ClipX.Lib v1.2 - <b>textarea()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
TextArea()
Returns/writes HTML TextArea form-object tag
---------------------------------------------------------------------

Syntax:

  TextArea( [<cName>], [<nRows>], [<nCols>], [<cText>] )  --->  cString

Arguments:

  [<cName>] is a character string for the name of the TextArea field.

  [<nRows>] is a numeric value for the number of rows.

  [<nCols>] is a numeric value for the number of columns.

  [<cText>] is a character string for the default text.

Returns: A character string consisting of the generated HTML tag.

Description:

  Generates a TextArea form-object tag. This form object can be used much
  like the Clipper memo field for large amounts of character data.

  Special attention should be given to large text strings or memo fields which
  may contain hard-carriage-returns Chr(13) and/or soft-carriage-returns
  Chr(141). Soft-carriage-returns can cause data to look jagged if display
  in a textarea which is not the same width as the original textarea or
  memoedit width. The CA-Clipper MemoTran() can be used to make the textarea
  display more presentable. See the Example below.

  Displaying a dbf memo filed to an HTML page outside of a testarea tag, may
  not provide a fomatted look.

  The generated string is always returned. The string will be written
  to standard-out depending on the value of StopWrite().
  The default StopWrite() value is FALSE. Setting the StopWrite() value
  to TRUE will suspend the write to standard-out.

Examples:


  Example 1: Textarea with a default string.
    ....
    FormBeg( "MyForm", "abc.exe", "POST" )
      TextArea( "taField",3,20,"Enter your message here." )
    FormEnd()
    ...

  Example 2. Displaying a dbf memo filed in a textarea

    function Main()

      if !ClipXOpen()
        Quit
      endif
      header()
      htmlBodyBeg()

      use myDbf

      FormBeg( "myForm", "abc.exe", "POST" )

        // Use MemoTran() to preserve hard CR and replace soft CR with space
        TextArea( "MyName", 10, 80, MemoTran( myDbf->notes, Chr(13), Space(1) ) )

      FormEnd()

      htmlBodyEnd()

      ClipXClose()

    return nil

Files: Library is ClipX.Lib

Online reference:  Mikodocs Guide To HTML - TEXTAREA tag


See Also: Input()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson