Oracle® Application Server PL/SQL Web Toolkit Reference
10g Release 2 (10.1.2) B15896-01 |
|
Previous |
Next |
The htp (hypertext procedures) and htf (hypertext functions) packages generate HTML tags. For instance, the htp.anchor procedure generates the HTML anchor tag, <A>. The following commands generate a simple HTML document:
create or replace procedure hello AS BEGIN htp.htmlopen; -- generates <HTML> htp.headopen; -- generates <HEAD> htp.title('Hello'); -- generates <TITLE>Hello</TITLE> htp.headclose; -- generates </HEAD> htp.bodyopen; -- generates <BODY> htp.header(1, 'Hello'); -- generates <H1>Hello</H1> htp.bodyclose; -- generates </BODY> htp.htmlclose; -- generates </HTML> END;
For every htp procedure that generates HTML tags, there is a corresponding htf function with identical parameters. The function versions do not directly generate output in your web page. Instead, they pass their output as return values to the statements that invoked them. Use these functions when you need to nest calls. To look up htf functions, see the entry for the corresponding htp procedures.
To print the output of htf functions, call the functions from within the htp.print procedure. It then prints its parameters to the generated web page.
Note: If you use values of the LONG data type in procedures such as htp.print, htp.prn, htp.prints, htp.pa or owa_util.cellsprint, only the first 32 K of the LONG data is used. The LONG data is bound to a varchar2 data type in the procedure or function. |
HTML, HEAD, and BODY Tags
htp.htmlOpen, htp.htmlClose - generate <HTML> and </HTML>
htp.headOpen, htp.headClose - generate <HEAD> and </HEAD>
htp.bodyOpen, htp.bodyClose - generate <BODY> and </BODY>
Comment Tag
htp.comment - generates <!-- and -->
Tags in the <HEAD> Area
htp.base - generates <BASE>
htp.linkRel - generates <LINK> with the REL attribute
htp.linkRev - generates <LINK> with the REV attribute
htp.title - generates <TITLE>
htp.meta - generates <META>
htp.script - generates <SCRIPT>
htp.style - generates <STYLE>
htp.isindex - generates <ISINDEX>
htp.appletopen, htp.appletclose - generate <APPLET> and </APPLET>
htp.param - generates <PARAM>
htp.olistOpen, htp.olistClose - generate <OL> and </OL>
htp.ulistOpen, htp.ulistClose - generate <UL> and </UL>
htp.dlistOpen, htp.dlistClose - generate <DL> and </DL>
htp.dlistTerm - generates <DT>
htp.dlistDef - generates <DD>
htp.dirlistOpen, htp.dirlistClose - generate <DIR> and </DIR>
htp.listHeader - generates <LH>
htp.listingOpen, htp.listingClose - generate <LISTING> and </LISTING>
htp.menulistOpen, htp.menulistClose - generate <MENU> and </MENU>
htp.listItem - generates <LI>
htp.formOpen, htp.formClose - generate <FORM> and </FORM>
htp.formCheckbox - generates <INPUT TYPE="CHECKBOX">
htp.formHidden - generates <INPUT TYPE="HIDDEN">
htp.formImage - generates <INPUT TYPE="IMAGE">
htp.formPassword - generates <INPUT TYPE="PASSWORD">
htp.formRadio - generates <INPUT TYPE="RADIO">
htp.formSelectOpen, htp.formSelectClose - generate <SELECT> and </SELECT>
htp.formSelectOption - generates <OPTION>
htp.formText - generates <INPUT TYPE="TEXT">
htp.formTextarea, htp.formTextarea2 - generate <TEXTAREA>
htp.formTextareaOpen, htp.formTextareaOpen2, htp.formTextareaClose - generate <TEXTAREA> and </TEXTAREA>
htp.formReset - generates <INPUT TYPE="RESET">
htp.formSubmit - generates <INPUT TYPE="SUBMIT">
htp.tableOpen, htp.tableClose - generate <TABLE> and </TABLE>
htp.tableCaption - generates <CAPTION>
htp.tableRowOpen, htp.tableRowClose - generate <TR> and </TR>
htp.tableHeader - generates <TH>
htp.tableData - generates <TD>
htf.format_cell - generates <TD>
IMG, HR, and A Tags
htp.line, htp.hr - generate <HR>
htp.img, htp.img2 - generate <IMG>
htp.anchor, htp.anchor2 - generates <A>
htp.mapOpen, htp.mapClose - generate <MAP> and </MAP>
htp.header - generates heading tags (<H1> to <H6>)
htp.para, htp.paragraph - generate <P>
htp.print, htp.prn - generate any text that is passed in
htp.prints, htp.ps - generate any text that is passed in; special characters in HTML are escaped
htp.preOpen, htp.preClose - generate <PRE> and </PRE>
htp.blockquoteOpen, htp.blockquoteClose - generate <BLOCKQUOTE> and </BLOCKQUOTE>
htp.div - generates <DIV>
htp.nl, htp.br - generate <BR>
htp.nobr - generates <NOBR>
htp.wbr - generates <WBR>
htp.plaintext - generates <PLAINTEXT>
htp.address - generates <ADDRESS>
htp.mailto - generates <A> with the MAILTO attribute
htp.area - generates <AREA>
htp.bgsound - generates <BGSOUND>
htp.basefont - generates <BASEFONT>
htp.big - generates <BIG>
htp.bold - generates <B>
htp.center - generates <CENTER> and </CENTER>
htp.centerOpen, htp.centerClose - generate <CENTER> and </CENTER>
htp.cite - generates <CITE>
htp.code - generates <CODE>
htp.dfn - generates <DFN>
htp.get_download_files_list - generate <EM>
htp.fontOpen, htp.fontClose - generate <FONT> and </FONT>
htp.italic - generates <I>
htp.keyboard, htp.kbd - generate <KBD> and </KBD>
htp.s - generates <S>
htp.sample - generates <SAMP>
htp.small - generates <SMALL>
htp.strike - generates <STRIKE>
htp.strong - generates <STRONG>
htp.sub - generates <SUB>
htp.sup - generates <SUP>
htp.teletype - generates <TT>
htp.underline - generates <U>
htp.variable - generates <VAR>
htp.frame - generates <FRAME>
htp.framesetOpen, htp.framesetClose - generate <FRAMESET> and </FRAMESET>
htp.noframesOpen, htp.noframesClose - generate <NOFRAMES> and </NOFRAMES>
This generates the <ADDRESS> and </ADDRESS> tags, which specify the address, author and signature of a document.
Table 1-1 htp.address
Properties | Definitions |
---|---|
Syntax: |
htp.address ( cvalue in varchar2 cnowrap in varchar2 DEFAULT NULL cclear in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL); htf.address (cvalue, cnowrap, cclear, cattributes) return varchar2; |
Parameters: |
cvalue - the string that goes between the <ADDRESS> and </ADDRESS> tags. cnowrap - if the value for this parameter is not NULL, the NOWRAP attribute is included in the tag. cclear - the value for the CLEAR attribute. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<ADDRESS CLEAR="cclear" NOWRAP cattributes>cvalue</ADDRESS> |
These generate the <A> and </A> HTML tags, which specify the source or destination of a hypertext link. This tag accepts several attributes, but either HREF or NAME is required. HREF specifies to where to link. NAME allows this tag to be a target of a hypertext link. The difference between these subprograms is that htp.anchor2 provides a target and therefore can be used for a frame.
Table 1-2 htp.anchor,htp.anchor2
Properties | Definitions |
---|---|
Syntax: |
htp.anchor ( curl in varchar2 ctext in varchar2 cname in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL); htf.anchor (curl, ctext, cname, cattributes) return varchar2; htp.anchor2 ( curl in varchar2 ctext in varchar2 cname in varchar2 DEFAULT NULL ctarget in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL); htf.anchor2 (curl, ctext, cname, ctarget, cattributes) return varchar2; |
Parameters: |
curl - the value for the HREF attribute. ctext - the string that goes between the <A> and </A> tags. cname - the value for the NAME attribute. ctarget - the value for the TARGET attribute. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<A HREF="curl" NAME="cname" cattributes>ctext</A> <A HREF="curl" NAME="cname" TARGET = "ctarget" cattributes>ctext</A> |
htp.appletopen generates the <APPLET> HTML tag, which begins the invocation of a Java applet. Close the applet invocation with htp.appletclose, which generates the </APPLET> HTML tag.
Specify parameters to the Java applet using the htp.param procedure.
Use the cattributes parameter to specify the CODEBASE attribute since the PL/SQL cartridge does not know where to find the class files. The CODEBASE attribute specifies the virtual path containing the class files.
Table 1-3 htp.appleton, htp.appletclose
Properties | Definitions |
---|---|
Syntax: |
htp.appletopen( ccode in varchar2 cheight in number cwidth in number cattributes in varchar2 DEFAULT NULL); htf.appletopen(ccode, cheight, cwidth, cattributes) return varchar2; htp.appletclose; htf.appletclose return varchar2; |
Parameters: |
ccode - the value for the CODE attribute, which specifies the name of the applet class. cheight - the value for the HEIGHT attribute. cwidth - the value for the WIDTH attribute. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<APPLET CODE=ccode HEIGHT=cheight WIDTH=cwidth cattributes> </APPLET> |
Example: |
htp.appletopen('testclass.class', 100, 200, 'CODEBASE="/ows-applets"') generates <APPLET CODE="testclass.class" height=100 width=200 CODEBASE="/ows-applets"> |
This generates the <AREA> HTML tag, which defines a client-side image map. The <AREA> tag defines areas within the image and destinations for the areas.
Table 1-4 htp.area
Properties | Definitions |
---|---|
Syntax: |
htp.area( ccoords in varchar2 cshape in varchar2 DEFAULT NULL chref in varchar2 DEFAULT NULL cnohref in varchar2 DEFAULT NULL ctarget in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL); htf.area(ccoords, cshape, chref, cnohref, ctarget, cattributes) return varchar2; |
Parameters: |
ccoords - the value for the COORDS attribute. cshape - the value for the SHAPE attribute. chref - the value for the HREF attribute. cnohref - if the value for this parameter is not NULL, the NOHREF attribute is added to the tag. ctarget - the value for the TARGET attribute. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<AREA COORDS="ccoords" SHAPE="cshape" HREF="chref" NOHREF TARGET="ctarget" cattributes> |
This generates the <BASE> HTML tag, which records the URL of the document.
Table 1-5 htp.base
Properties | Definitions |
---|---|
Syntax: |
htp.base( ctarget in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL); htf.base(ctarget, cattributes) return varchar2; |
Parameters: |
ctarget - the value for the TARGET attribute, which establishes a window name to which all links in this document are targeted. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<BASE HREF="<current URL>" TARGET="ctarget" cattributes> |
This generates the <BASEFONT> HTML tag, which specifies the base font size for a Web page.
This generates the <BGSOUND> HTML tag, which includes audio for a Web page.
Table 1-7 htp.bgsound
Properties | Definitions |
---|---|
Syntax: |
htp.bgsound( csrc in varchar2 cloop in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL); htf.bgsound(csrc, cloop, cattributes) return varchar2; |
Parameters: |
csrc - the value for the SRC attribute. cloop - the value for the LOOP attribute. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<BGSOUND SRC="csrc" LOOP="cloop" cattributes> |
This generates the <BIG> and </BIG> tags, which direct the browser to render the text in a bigger font.
Table 1-8 htp.big
Properties | Definitions |
---|---|
Syntax: |
htp.big( ctext in varchar2 cattributes in varchar2 DEFAULT NULL); htf.big(ctext, cattributes) return varchar2; |
Parameters: |
ctext - the text that goes between the tags. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<BIG cattributes>ctext</BIG> |
This generates the <BLOCKQUOTE> and </BLOCKQUOTE> tag, which mark a section of quoted text.
Table 1-9 htp.blockquoteOpen, htp.blockquoteClose
Properties | Definitions |
---|---|
Syntax: |
htp.blockquoteOpen ( cnowrap in varchar2 DEFAULT NULL cclear in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL); htf.blockquoteOpen (cnowrap, cclear, cattributes) return varchar2; htp.blockquoteClose; htf.blockquoteClose return varchar2; |
Parameters: |
cnowrap - if the value for this parameter is not NULL, the NOWRAP attribute is added to the tag. cclear - the value for the CLEAR attribute. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<BLOCKQUOTE CLEAR="cclear" NOWRAP cattributes> </BLOCKQUOTE> |
This generates the <BODY> and </BODY> tags, which mark the body section of an HTML document.
Table 1-10 htp.bodyOpen, htp.bodyClose
Properties | Definitions |
---|---|
Syntax: |
htp.bodyOpen( cbackground in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL); htf.bodyOpen(cbackground, cattributes) return varchar2; htp.bodyClose; htf.bodyClose return varchar2; |
Parameters: |
cbackground - the value for the BACKGROUND attribute, which specifies a graphic file to use for the background of the document. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<BODY background="cbackground" cattributes> </BODY> |
Example: |
htp.bodyOpen('/img/background.gif'); generates: <BODY background="/img/background.gif"> |
This generates the <B> and </B> tags, which direct the browser to display the text in boldface.
Table 1-11 htp.bold
Properties | Definitions |
---|---|
Syntax: |
htp.bold ( ctext in varchar2 cattributes in varchar2 DEFAULT NULL); htf.bold (ctext, cattributes) return varchar2; |
Parameters: |
ctext - the text that goes between the tags. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<B cattributes>ctext</B> |
This generates the <CENTER> and </CENTER> tags, which center a section of text within a Web page.
This generates the <CENTER> and </CENTER> tags, which mark the section of text to center.
This generates the <CITE> and </CITE> tags, which direct the browser to render the text as citation.
Table 1-14 htp.cite
Properties | Definitions |
---|---|
Syntax: |
htp.cite ( ctext in varchar2 cattributes in varchar2 DEFAULT NULL); htf.cite (ctext, cattributes) return varchar2; |
Parameters: |
ctext - the text to render as citation. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<CITE cattributes>ctext</CITE> |
This generates the <CODE> and </CODE> tags, which direct the browser to render the text in monospace font.
Table 1-15 htp.code
Properties | Definitions |
---|---|
Syntax: |
htp.code ( ctext in varchar2 cattributes in varchar2 DEFAULT NULL); htf.code (ctext, cattributes) return varchar2; |
Parameters: |
ctext - the text to render as code. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<CODE cattributes>ctext</CODE> |
This generates the <DFN> and </DFN> tags, which direct the browser to render the text in italics.
This generates the <DIR> and </DIR> tags, which create a directory list section. A directory list presents a list of items that contains up to 20 characters. Items in this list are typically arranged in columns, 24 characters wide. The <LI> tag or must appear directly after this tag to define the items in the list.
This generates the <DIV> tag, which creates document divisions.
Table 1-19 htp.div
Properties | Definitions |
---|---|
Syntax: |
htp.div( calign in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL); htf.div(calign, cattributes) return varchar2; |
Parameters: |
calign - the value for the ALIGN attribute. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<DIV ALIGN="calign" cattributes> |
This generates the <DL> and </DL> tags, which create a definition list. A definition list looks like a glossary: it contains terms and definitions. Terms are inserted using htp.dlistTerm, and definitions are inserted using htp.dlistDef.
Table 1-20 htp.dlistOpen, htp.dlistClose
Properties | Definitions |
---|---|
Syntax: |
htp.dlistOpen ( cclear in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL); htf.dlistOpen (cclear, cattributes) return varchar2; htp.dlistClose; htf.dlistClose return varchar2; |
Parameters: |
cclear - the value for the CLEAR attribute. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<DL CLEAR="cclear" cattributes> </DL> |
This generates the <DD> tag, which inserts definitions of terms. Use this tag for a definition list <DL>. Terms are tagged <DT> and definitions are tagged <DD>.
Table 1-21 htp.dlistDef
Properties | Definitions |
---|---|
Syntax: |
htp.dlistDef( ctext in varchar2 DEFAULT NULL cclear in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL); htf.dlistDef(ctext, cclear, cattributes) return varchar2; |
Parameters: |
ctext - the definition for the term. cclear - the value for the CLEAR attribute. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<DD CLEAR="cclear" cattributes>ctext |
This generates the <DT> tag, which defines a term in a definition list <DL>.
Table 1-22 htp.dlistTerm
Properties | Definitions |
---|---|
Syntax: |
htp.dlistTerm ( ctext in varchar2 DEFAULT NULL cclear in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL); htf.dlistTerm (ctext, cclear, cattributes) return varchar2; |
Parameters: |
ctext - the term. cclear - the value for the CLEAR attribute. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<DT CLEAR="cclear" cattributes>ctext |
After uploading files to the database, you can download them, delete them from the database, and read and write their attributes.
After you have downloaded files to the database, you need to get the files.
This generates the <EM> and </EM> tags, which define text to be emphasized.
Table 1-25 htp.emphasis, htp.em
Properties | Definitions |
---|---|
Syntax: |
htp.em ( ctext in varchar2 cattributes in varchar2 DEFAULT NULL); htf.em (ctext, cattributes) return varchar2; htp.emphasis ( ctext in varchar2 cattributes in varchar2 DEFAULT NULL); htf.emphasis (ctext, cattributes) return varchar2; |
Parameters: |
ctext - the text to emphasize. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<EM cattributes>ctext</EM> |
This replaces characters that have special meaning in HTML with their escape sequences. The following characters are converted:
The procedure version of this subprogram does the same thing as htp.prints and htp.ps.
This replaces characters that have special meaning in HTML and HTTP with their escape sequences. The following characters are converted:
Table 1-27 htf.escape_url
Properties | Definitions |
---|---|
Syntax: |
htf.escape_url(p_url in varchar2) return varchar2; |
Parameters: |
p_url - the string to convert. |
Generates: |
The converted string. |
Note: This procedure is provided for backward compatibility reasons only. It does not comply with the Internet Engineering Task Force (IETF) Request for Comments (RFC) standards of URL encoding. If you need to encode URLs, it is recommended that you use the functionutl_url.escape() that is available in the PL/SQL packages supplied with the Oracle Database.
|
This generates the <FONT> and </FONT> tags, which mark a section of text with the specified font characteristics.
Table 1-28 htp.fontOpen,htp.fontClose
Properties | Definitions |
---|---|
Syntax: |
htp.fontOpen( ccolor in varchar2 DEFAULT NULL cface in varchar2 DEFAULT NULL csize in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL); htf.fontOpen(ccolor, cface, csize, cattributes) return varchar2; htp.fontClose; htf.fontClose return varchar2; |
Parameters: |
ccolor - the value for the COLOR attribute. cface - the value for the FACE attribute. csize - the value for the SIZE attribute. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<FONT COLOR="ccolor" FACE="cface" SIZE="csize" cattributes> </FONT> |
This formats column values inside an HTML table using htf.tableData. It allows better control over the HTML tables.
Table 1-29 htf.format_cell
Properties | Definitions |
---|---|
Syntax: |
htf.format_cell ( columnValue in varchar2 format_numbers in varchar2 DEFAULT NULL) return varchar2; |
Parameters: |
columnValue - the value that needs to be formatted in an HTML table. format_numbers - the format that numeric data is displayed in. If the value of this parameter is not Null, number fields are right-justified and rounded to two decimal places. |
Generates: |
<TD>columnValue</TD> |
This generates the <INPUT> tag with TYPE="checkbox", which inserts a checkbox element in a form. A checkbox element is a button that the user toggles on or off.
Table 1-30 htp.formCheckbox
Properties | Definitions |
---|---|
Syntax: |
htp.formCheckbox ( cname in varchar2 cvalue in varchar2 DEFAULT 'on' cchecked in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL); htf.formCheckbox (cname, cvalue, cchecked, cattributes) return varchar2; |
Parameters: |
cname - the value for the NAME attribute. cvalue - the value for the VALUE attribute. cchecked - if the value for this parameter is not NULL, the CHECKED attribute is added to the tag. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<INPUT TYPE="checkbox" NAME="cname" VALUE="cvalue" CHECKED cattributes> |
This generates the <FORM> and </FORM> tags, which create a form section in an HTML document.
Table 1-31 htp.formOpen, htp.formClose
Properties | Definitions |
---|---|
Syntax: |
htp.formOpen ( curl in varchar2 cmethod in varchar2 DEFAULT 'POST' ctarget in varchar2 DEFAULT NULL cenctype in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL); htf.formOpen (curl, cmethod, ctarget, cenctype, cattributes) return varchar2; htp.formClose; htf.formClose return varchar2; |
Parameters: |
curl - the URL of the WRB or CGI script where the contents of the form is sent. This parameter is required. cmethod - the value for the METHOD attribute. The value can be "GET" or "POST". ctarget - the value for the TARGET attribute. cenctype - the value for the ENCTYPE attribute. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<FORM ACTION="curl" METHOD="cmethod" TARGET="ctarget" ENCTYPE="cenctype" cattributes> </FORM> |
This generates the <INPUT> tag with TYPE="file", which allows the user to select files so that their contents may be submitted with a form.
Table 1-32 htp.formFile
Properties | Definitions |
---|---|
Syntax: |
function formFile( cname in varchar2 caccept in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL); htf.formFile (cname, caccept, cattributes) return varchar2; |
Parameters: |
cname - the value for the NAME attribute. caccept - a comma seperated list of MIME types for upload cattributes - other attributes to be included as-is in the tag. |
Generates: |
<INPUT TYPE="file" NAME="cname" ACCEPT="caccept" cattributes> |
This generates the <INPUT> tag with TYPE="hidden", which inserts a hidden form element. This element is not seen by the user. It submits additional values to the script.
Table 1-33 htp.formHidden
Properties | Definitions |
---|---|
Syntax: |
htp.formHidden ( cname in varchar2 cvalue in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL); htf.formHidden (cname, cvalue, cattributes) return varchar2; |
Parameters: |
cname - the value for the NAME attribute. cvalue - the value for the VALUE attribute. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<INPUT TYPE="hidden" NAME="cname" VALUE="cvalue" cattributes> |
This generates the <INPUT> tag with TYPE="image", which creates an image field that the user clicks to submit the form immediately. The coordinates of the selected point are measured in pixels, and returned (along with other contents of the form) in two name/value pairs. The x coordinate is submitted under the name of the field with .x appended, and the y coordinate with .y appended. Any VALUE attribute is ignored.
Table 1-34 htp.formImage
Properties | Definitions |
---|---|
Syntax: |
htp.formImage ( cname in varchar2 csrc in varchar2 calign in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL); htf.formImage (cname, csrc, calign, cattributes) return varchar2; |
Parameters: |
cname - the VALUE for the NAME attribute. csrc - the value for the SRC attribute, which specifies the image file. calign - the value for the ALIGN attribute. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<INPUT TYPE="image" NAME="cname" SRC="csrc" ALIGN="calign" cattributes> |
This generates the <INPUT> tag with TYPE="password", which creates a single-line text entry field. When the user enters text in the field, each character is represented by one asterisk. This is used for entering passwords.
Table 1-35 htp.formPassword
Properties | Definitions |
---|---|
Syntax: |
htp.formPassword ( cname in varchar2 csize in varchar2 cmaxlength in varchar2 DEFAULT NULL cvalue in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL); htf.formPassword (cname, csize, cmaxlength, cvalue, cattributes) return varchar2; |
Parameters: |
cname - the value for the NAME attribute. csize - the value for the SIZE attribute. cmaxlength - the value for the MAXLENGTH attribute. cvalue - the value for the VALUE attribute. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<INPUT TYPE="password" NAME="cname" SIZE="csize" MAXLENGTH="cmaxlength" VALUE="cvalue" cattributes> |
This generates the <INPUT> tag with TYPE="radio", which creates a radio button on the HTML form. Within a set of radio buttons, the user selects only one. Each radio button in the same set has the same name, but different values. The selected radio button generates a name/value pair.
Table 1-36 htp.formRadio
Properties | Definitions |
---|---|
Syntax: |
htp.formRadio ( cname in varchar2 cvalue in varchar2 cchecked in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL); htf.formRadio (cname, cvalue, cchecked, cattributes) return varchar2; |
Parameters: |
cname - the value for the NAME attribute. cvalue - the value for the VALUE attribute. cchecked - if the value for this parameter is not NULL, the CHECKED attribute is added to the tag. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<INPUT TYPE="radio" NAME="cname" VALUE="cvalue" CHECKED cattributes> |
This generates the <INPUT> tag with TYPE="reset", which creates a button that, when selected, resets the form fields to their initial values.
Table 1-37 htp.formReset
Properties | Definitions |
---|---|
Syntax: |
htp.formReset ( cvalue in varchar2 DEFAULT 'Reset' cattributes in varchar2 DEFAULT NULL); htf.formReset (cvalue, cattributes) return varchar2; |
Parameters: |
cvalue - the value for the VALUE attribute. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<INPUT TYPE="reset" VALUE="cvalue" cattributes> |
This generates the <SELECT> and </SELECT> tags, which creates a Select form element. A Select form element is a listbox where the user selects one or more values. The values are inserted using htp.formSelectOption.
Table 1-38 htp.formSelectOpen,htp.formSelectClose
Properties | Definitions |
---|---|
Syntax: |
htp.formSelectOpen ( cname in varchar2 cprompt in varchar2 DEFAULT NULL nsize in integer DEFAULT NULL cattributes in varchar2 DEFAULT NULL); htf.formSelectOpen (cname, cprompt, nsize, cattributes) return varchar2; htp.formSelectClose; htf.formSelectClose return varchar2; |
Parameters: |
cname - the value for the NAME attribute. cprompt - the string preceding the list box. nsize - the value for the SIZE attribute. cattributes - other attributes to be included as-is in the tag. |
Generates: |
cprompt <SELECT NAME="cname" SIZE="nsize" cattributes> </SELECT> |
Example: |
htp.formSelectOpen('greatest_player', 'Pick the greatest player:'); htp.formSelectOption('Messier'); htp.formSelectOption('Howe'); htp.formSelectOption('Gretzky');. htp.formSelectClose; Generates: Pick the greatest player: <SELECT NAME="greatest_player"> <OPTION>Messier <OPTION>Howe <OPTION>Gretzky </SELECT> |
This generates the <OPTION> tag, which represents one choice in a Select element.
Table 1-39 htp.formSelectOption
Properties | Definitions |
---|---|
Syntax: |
htp.formSelectOption ( cvalue in varchar2 cselected in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL); htf.formSelectOption (cvalue, cselected, cattributes) return varchar2; |
Parameters: |
cvalue - the text for the option. cselected - if the value for this parameter is not NULL, the SELECTED attribute is added to the tag. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<OPTION SELECTED cattributes>cvalue |
Example: |
This generates the <INPUT> tag with TYPE="submit", which creates a button that, when clicked, submits the form.
If the button has a NAME attribute, the button contributes a name/value pair to the submitted data.
Table 1-40 htp.formSubmit
Properties | Definitions |
---|---|
Syntax: |
htp.formSubmit ( cname in varchar2 DEFAULT NULL cvalue in varchar2 DEFAULT 'Submit' cattributes in varchar2 DEFAULT NULL); htf.formSubmit (cname, cvalue, cattributes) return varchar2; |
Parameters: |
cname - the value for the NAME attribute. cvalue - the value for the VALUE attribute. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<INPUT TYPE="submit" NAME="cname" VALUE="cvalue" cattributes> |
This generates the <INPUT> tag with TYPE="text", which creates a field for a single line of text.
Table 1-41 htp.formText
Properties | Definitions |
---|---|
Syntax: |
htp.formText ( cname in varchar2 csize in varchar2 DEFAULT NULL cmaxlength in varchar2 DEFAULT NULL cvalue in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL); htf.formText (cname, csize, cmaxlength, cvalue, cattributes) return varchar2; |
Parameters: |
cname - the value for the NAME attribute. csize - the value for the SIZE attribute. cmaxlength - the value for the MAXLENGTH attribute. cvalue - the value for the VALUE attribute. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<INPUT TYPE="text" NAME="cname" SIZE="csize" MAXLENGTH="cmaxlength" VALUE="cvalue" cattributes> |
This generates the <TEXTAREA> tag, which creates a text field that has no predefined text in the text area. This field enables entering several lines of text.
The difference between these subprograms is that htp.formTextarea2 has the cwrap parameter, which specifies a wrap style.
Table 1-42 htp.formTextarea, htp.formTextarea2
Properties | Definitions |
---|---|
Syntax: |
htp.formTextarea ( cname in varchar2 nrows in integer ncolumns in integer calign in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL); htf.formTextarea (cname, nrows, ncolumns, calign, cattributes) return varchar2; htp.formTextarea2 ( cname in varchar2 nrows in integer ncolumns in integer calign in varchar2 DEFAULT NULL cwrap in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL); htf.formTextarea2 (cname, nrows, ncolumns, calign, cwrap, cattributes) return varchar2; |
Parameters: |
cname - the value for the NAME attribute. nrows - the value for the ROWS attribute. This is an integer. ncolumns - the value for the COLS attribute. This is an integer. calign - the value for the ALIGN attribute. cwrap - the value for the WRAP attribute. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<TEXTAREA NAME="cname" ROWS="nrows" COLS="ncolumns" ALIGN="calign" cattributes></TEXTAREA> <TEXTAREA NAME="cname" ROWS="nrows" COLS="ncolumns" ALIGN="calign" WRAP="cwrap" cattributes></TEXTAREA> |
This generates the <TEXTAREA> and </TEXTAREA> tags, which creates a text area form element The difference between the two open subprograms is that htp.formTextareaOpen2 has the cwrap parameter, which specifies a wrap style.
Table 1-43 htp.formTextareaOpen, htp.formTextareaOpen2, htp.formTextareaClose
Properties | Definitions |
---|---|
Syntax: |
htp.formTextareaOpen ( cname in varchar2 nrows in integer ncolumns in integer calign in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL); htf.formTextareaOpen (cname, nrows, ncolumns, calign, cattributes) return varchar2; htp.formTextareaOpen2( cname in varchar2 nrows in integer ncolumns in integer calign in varchar2 DEFAULT NULL cwrap in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL); htf.formTextareaOpen2(cname, nrows, ncolumns, calign, cwrap, cattributes) return varchar2; htp.formTextareaClose; htf.formTextareaClose return varchar2; |
Parameters: |
cname - the value for the NAME attribute. nrows - the value for the ROWS attribute. This is an integer. ncolumns - the value for the COLS attribute. This is an integer. calign - the value for the ALIGN attribute. cwrap - the value for the WRAP attribute. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<TEXTAREA NAME="cname" ROWS="nrows" COLS="ncolumns" ALIGN="calign" cattributes> <TEXTAREA NAME="cname" ROWS="nrows" COLS="ncolumns" ALIGN="calign" WRAP = "cwrap" cattributes> </TEXTAREA> |
This generates the <FRAME> tag, which defines the characteristics of a frame created by a <FRAMESET> tag.
Table 1-44 htp.frame
Properties | Definitions |
---|---|
Syntax: |
htp.frame( csrc in varchar2 cname in varchar2 DEFAULT NULL cmarginwidth in varchar2 DEFAULT NULL cmarginheight in varchar2 DEFAULT NULL cscrolling in varchar2 DEFAULT NULL cnoresize in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL); htf.frame(csrc, cname, cmarginwidth, cmarginheight, cscrolling, cnoresize, cattributes) return varchar2; |
Parameters: |
csrc - the URL to display in the frame. cname - the value for the NAME attribute. cmarginwidth - the value for the MARGINWIDTH attribute. cmarginheight - the value for the MARGINHEIGHT attribute. cscrolling - the value for the SCROLLING attribute. noresize - if the value for this parameter is not NULL, the NORESIZE attribute is added to the tag. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<FRAME SRC="csrc" NAME="cname" MARGINWIDTH="cmarginwidth" MARGINHEIGHT="cmarginheight" SCROLLING="cscrolling" NORESIZE cattributes> |
This generates the <FRAMESET> and </FRAMESET> tags, which define a frameset section.
Table 1-45 htp.framesetOpen, htp.framesetClose
Properties | Definitions |
---|---|
Syntax: |
htp.framesetOpen( crows in varchar2 DEFAULT NULL ccols in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL); htf.framesetOpen(crows, ccols, cattributes) return varchar2; htp.framesetClose; htf.framesetClose return varchar2; |
Parameters: |
crows - the value for the ROWS attribute. ccols - the value for the COLS attribute. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<FRAMESET ROWS="crows" COLS="ccols" cattributes> </FRAMESET> |
This generates the <HEAD> and </HEAD> tags, which mark the HTML document head section
This generates opening heading tags (<H1> to <H6>) and their corresponding closing tags (</H1> to </H6>).
Table 1-47 htp.header
Properties | Definitions |
---|---|
Syntax: |
htp.header ( nsize in integer cheader in varchar2 calign in varchar2 DEFAULT NULL cnowrap in varchar2 DEFAULT NULL cclear in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL); htf.header (nsize, cheader, calign, cnowrap, cclear, cattributes) return varchar2; |
Parameters: |
nsize - the heading level. This is an integer between 1 and 6. |
|
calign - the value for the ALIGN attribute. cheader - the text to display in the heading. cnowrap - the value for the NOWRAP attribute. cclear - the value for the CLEAR attribute. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<Hnsize ALIGN="calign" NOWRAP CLEAR="cclear" cattributes>cheader</Hnsize> |
Example:
|
htp.header (1,'Overview'); produces: <H1>Overview</H1> |
This generates the <HTML> and </HTML> tags, which mark the beginning and the end of an HTML document.
This generates the <IMG> tag, which directs the browser to load an image onto the HTML page. The difference between these subprograms is that htp.img2 uses the cusemap parameter.
Table 1-49 htp.img, htp.img2
Properties | Definitions |
---|---|
Syntax: |
htp.img ( curl in varchar2 DEFAULT NULL calign in varchar2 DEFAULT NULL calt in varchar2 DEFAULT NULL cismap in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL); htf.img (curl, calign, calt, cismap, cattributes) return varchar2; htp.img2( curl in varchar2 DEFAULT NULL calign in varchar2 DEFAULT NULL calt in varchar2 DEFAULT NULL cismap in varchar2 DEFAULT NULL cusemap in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL); htf.img2(curl, calign, calt, cismap, cusemap, cattributes) return varchar2; |
Parameters: |
curl - the value for the SRC attribute. calign - the value for the ALIGN attribute. calt - the value for the ALT attribute, which specifies alternative text to display if the browser does not support images. cismap - if the value for this parameter is not NULL, the ISMAP attribute is added to the tag. The attribute indicates that the image is an imagemap. cusemap - the value for the USEMAP attribute, which specifies a client-side image map. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<IMG SRC="curl" ALIGN="calign" ALT="calt" ISMAP cattributes> <IMG SRC="curl" ALIGN="calign" ALT="calt" ISMAP USEMAP="cusemap" cattributes> |
This creates a single entry field with a prompting text, such as "enter value," then sends that value to the URL of the page or program.
Table 1-50 htp.isindex
Properties | Definitions |
---|---|
Syntax: |
htp.isindex ( cprompt in varchar2 DEFAULT NULL curl in varchar2 DEFAULT NULL); htf.isindex (cprompt, curl) return varchar2; |
Parameters: |
cprompt - the value for the PROMPT attribute. curl - the value for the HREF attribute. |
Generates: |
|
This generates the <I> and </I> tags, which direct the browser to render the text in italics.
Table 1-51 htp.italic
Properties | Definitions |
---|---|
Syntax |
htp.italic ( ctext in varchar2 cattributes in varchar2 DEFAULT NULL); htf.italic (ctext, cattributes) return varchar2; |
Parameters |
ctext - the text to be rendered in italics. cattributes - other attributes to be included as-is in the tag. |
Generates |
<I cattributes>ctext</I> |
This generates the <KBD> and </KBD> tags, which direct the browser to render the text in monospace. These subprograms do the same thing.
Table 1-52 htp.keyboard, htp.kbd
Properties | Definitions |
---|---|
Syntax: |
htp.keyboard ( ctext in varchar2 cattributes in varchar2 DEFAULT NULL); htf.keyboard (ctext, cattributes) return varchar2; htp.kbd ( ctext in varchar2 cattributes in varchar2 DEFAULT NULL); htf.kbd (ctext, cattributes) return varchar2; |
Parameters: |
ctext - the text to render in monospace. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<KBD cattributes>ctext</KBD> |
This generates the <HR> tag, which generates a line in the HTML document.
Table 1-53 htp.line, htp.hr
Properties | Definitions |
---|---|
Purpose |
Generates the <HR> tag, which generates a line in the HTML document. |
Syntax |
htp.line ( cclear in varchar2 DEFAULT NULL csrc in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL); htf.line (cclear, csrc, cattributes) return varchar2; htp.hr ( cclear in varchar2 DEFAULT NULL csrc in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL); htf.hr (cclear, csrc, cattributes) return varchar2; |
Parameters |
cclear - the value for the CLEAR attribute. csrc - the value for the SRC attribute, which specifies a custom image as the source of the line. cattributes - other attributes to be included as-is in the tag. |
Generates |
<HR CLEAR="cclear" SRC="csrc" cattributes> |
This generates the <LINK> tag with the REL attribute, which gives the relationship described by the hypertext link from the anchor to the target. This is only used when the HREF attribute is present. This tag indicates a relationship between documents, but does not create a link. To create a link, use htp.anchor, htp.anchor2.
Table 1-54 htp.linkRel
Properties | Directions |
---|---|
Syntax: |
htp.linkRel ( crel in varchar2 curl in varchar2 ctitle in varchar2 DEFAULT NULL); htf.linkRel (crel, curl, ctitle) return varchar2; |
Parameters: |
crel - the value for the REL attribute. curl - the value for the HREF attribute. ctitle - the value for the TITLE attribute. |
Generates: |
<LINK REL="crel" HREF="curl" TITLE="ctitle"> |
This generates the <LINK> tag with the REV attribute, which gives the relationship described by the hypertext link from the target to the anchor. This is the opposite of htp.linkRel. This tag indicates a relationship between documents, but does not create a link. To create a link, use htp.anchor, htp.anchor2.
Table 1-55 htp.linkRev
Properties | Definitions |
---|---|
Syntax: |
htp.linkRev ( crev in varchar2 curl in varchar2 ctitle in varchar2 DEFAULT NULL); htf.linkRev (crev, curl, ctitle) return varchar2; |
Parameters: |
crev - the value for the REV attribute. curl - the value for the HREF attribute ctitle - the value for the TITLE attribute. |
Generates |
<LINK REV="crev" HREF="curl" TITLE="ctitle"> |
This generates the <LH> and </LH> tags, which print an HTML tag at the beginning of the list.
Table 1-56 htp.listHeader
Properties | Definitions |
---|---|
Syntax: |
htp.listHeader ( ctext in varchar2 cattributes in varchar2 DEFAULT NULL); htf.listHeader (ctext, cattributes) return varchar2; |
Parameters: |
ctext - the text to place between <LH> and </LH>. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<LH cattributes>ctext</LH> |
This generates the <LISTING> and </LISTING> tags, which mark a section of fixed-width text in the body of an HTML page.
This generates the <LI> tag, which indicates a list item.
Table 1-58 htp.listltem
Properties | Definitions |
---|---|
Syntax: |
htp.listItem ( ctext in varchar2 DEFAULT NULL cclear in varchar2 DEFAULT NULL cdingbat in varchar2 DEFAULT NULL csrc in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL); htf.listItem (ctext, cclear, cdingbat, csrc, cattributes) return varchar2; |
Parameters: |
ctext - the text for the list item. cclear - the value for the CLEAR attribute. cdingbat - the value for the DINGBAT attribute. csrc - the value for the SRC attribute. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<LI CLEAR="cclear" DINGBAT="cdingbat" SRC="csrc" cattributes>ctext |
This generates the <A> tag with the HREF set to 'mailto' prepended to the mail address argument.
Table 1-59 htp.mailto
Properties | Definitions |
---|---|
Syntax: |
htp.mailto ( caddress in varchar2 ctext in varchar2 cname in varchar2 cattributes in varchar2 DEFAULT NULL); htf.mailto (caddress, ctext, cname, cattributes) return varchar2; |
Parameters: |
caddress - the email address of the recipient. ctext - the clickable portion of the link. cname - the value for the NAME attribute. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<A HREF="mailto:caddress" NAME="cname" cattributes>ctext</A> |
Example: |
htp.mailto('pres@white_house.gov','Send Email to the President'); generates: <A HREF="mailto:pres@white_house.gov">Send Email to the President</A> |
This generates the <MAP> and </MAP> tags, which mark a set of regions in a client-side image map.
Table 1-60 htp.mapOpen, htp.mapClose
Properties | Definitions |
---|---|
Syntax: |
htp.mapOpen( cname in varchar2 cattributes in varchar2 DEFAULT NULL); htf.mapOpen(cname, cattributes) return varchar2; htp.mapClose; htf.mapClose return varchar2; |
Parameters: |
cname - the value for the NAME attribute. cattributes - other attributes to be included as-is in the tag |
Generates: |
<MAP NAME="cname" cattributes>
</MAP> |
This generates the <MENU> and </MENU> tags, which create a list that presents one line for each item. The items in the list appear more compact than an unordered list. The htp.listItem defines the list items in a menu list.
This generates the <META> tag, which embeds meta-information about the document and also specifies values for HTTP headers. For example, you specify the expiration date, keywords, and author name.
Table 1-62 htp.meta
Properties | Definitions |
---|---|
Syntax: |
htp.meta ( chttp_equiv in varchar2 cname in varchar2 ccontent in varchar2); htf.meta (chttp_equiv, cname, ccontent) return varchar2; |
Parameters: |
chttp_equiv - the value for the HTTP-EQUIV attribute. cname - the value for the NAME attribute. ccontent - the value for the CONTENT attribute. |
Generates: |
<META HTTP-EQUIV="chttp_equiv" NAME ="cname" CONTENT="ccontent"> |
Example: |
htp.meta ('Refresh', NULL, 120); generates: <META HTTP-EQUIV="Refresh" CONTENT=120> On some Web browsers, this causes the current URL to be reloaded automatically every 120 seconds. |
This generates the <BR> tag, which begins a new line of text.
Table 1-63 htp.nl, htp.br
Properties | Definitions |
---|---|
Syntax: |
htp.nl ( cclear in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL); htf.nl (cclear, cattributes) return varchar2; htp.br ( cclear in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL); htf.br (cclear, cattributes) return varchar2; |
Parameters: |
cclear - the value for the CLEAR attribute. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<BR CLEAR="cclear" cattributes> |
This generates the <NOBR> and </NOBR> tags, which turn off line-breaking in a section of text.
This generates the <NOFRAMES> and </NOFRAMES> tags, which mark a no-frames section.
This generates the <OL> and </OL> tags, which define an ordered list. An ordered list presents a list of numbered items. Numbered items are added using htp.listItem.
Table 1-66 htp.olistOpen, htp.olistClose
Properties | Definitions |
---|---|
Syntax: |
htp.olistOpen ( cclear in varchar2 DEFAULT NULL cwrap in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL); htf.olistOpen (cclear, cwrap, cattributes) return varchar2; htp.olistClose; htf.olistClose return varchar2; |
Parameters: |
cclear - the value for the CLEAR attribute. cwrap - the value for the WRAP attribute. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<OL CLEAR="cclear" WRAP="cwrap" cattributes>
</OL> |
This generates the <P> tag, which indicates that the text that comes after the tag is to be formatted as a paragraph. htp.paragraph enables you to add attributes to the tag.
Table 1-67 htp.para, htp.paragraph
Properties | Definitions |
---|---|
Syntax: |
htp.para; htf.para return varcahr2; htp.paragraph ( calign in varchar2 DEFAULT NULL cnowrap in varchar2 DEFAULT NULL cclear in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL); htf.paragraph (calign, cnowrap, cclear, cattributes) return varchar2; |
Parameters: |
calign - the value for the ALIGN attribute. cnowrap - if the value for this parameter is not NULL, the NOWRAP attribute is added to the tag. cclear - the value for the CLEAR attribute. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<P>
<P ALIGN="calign" NOWRAP CLEAR="cclear" cattributes> |
This generates the <PARAM> tag, which specifies parameter values for Java applets. The values can reference HTML variables. To invoke a Java applet from a Web page, use htp.appletopen
to begin the invocation. Use one htp.param for each desired name-value pair, and use htp.appletclose
to end the applet invocation.
This generates the <PLAINTEXT> and </PLAINTEXT> tags, which direct the browser to render the text they surround in fixed-width type.
Table 1-69 htp.plaintext
Properties | Definitions |
---|---|
Syntax: |
htp.plaintext( ctext in varchar2 cattributes in varchar2 DEFAULT NULL); htf.plaintext(ctext, cattributes) return varchar2; |
Parameters: |
ctext - the text to be rendered in fixed-width font. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<PLAINTEXT cattributes>ctext</PLAINTEXT> |
This generates the <PRE> and </PRE> tags, which mark a section of preformatted text in the body of the HTML page.
Table 1-70 htp.preOpen, htp.preClose
Properties | Definitions |
---|---|
Syntax: |
htp.preOpen ( cclear in varchar2 DEFAULT NULL cwidth in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL); htf.preOpen (cclear, cwidth, cattributes) return varchar2; htp.preClose; htf.preClose return varchar2; |
Parameters: |
cclear - the value for the CLEAR attribute. cwidth - the value for the WIDTH attribute. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<PRE CLEAR="cclear" WIDTH="cwidth" cattributes>
</PRE> |
htp.print
generates the specified parameter as a string terminated with the \n
newline character. The \n
character is not the same as <BR>
. The \n
character formats the HTML source; it does not affect how the browser renders the HTML source. Use <BR>
to control how the browser renders the HTML source.
htp.prn
generates the specified parameter as a string. Unlike htp.print
, the string is not terminated with the \n
newline character. These subprograms are procedures only, they do not come as functions.
Table 1-71 htp.print, htp.prn
Properties | Definitions |
---|---|
Syntax |
htp.print (cbuf in varchar2); htp.print (dbuf in date); htp.print (nbuf in number); htp.prn (cbuf in varchar2); htp.prn (dbuf in date); htp.prn (nbuf in number); |
Parameters: |
cbuf, dbuf, nbuf - the string to generate. |
Generates: |
htp.print - a string terminated with a newline.
htp.prn - the specified string, not terminated with a newline. |
Both these subprograms generate a string and replace the following characters with the corresponding escape sequence.
If not replaced, the special characters are interpreted as HTML control characters and produce garbled output. This procedure is the same as htp.prn
but with the character substitution. These subprograms are procedures only, they are not available as functions. Use htf.escape_sc if you need a string conversion function.
This generates the <S> and </S> tags, which direct the browser to render the text they surround in strikethrough type.
Table 1-73 htp.s
Properties | Definitions |
---|---|
Syntax: |
htp.s( ctext in varchar2 cattributes in varchar2 DEFAULT NULL); htf.s(ctext, cattributes) return varchar2; |
Parameters: |
ctext - the text to render in strikethrough type. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<S cattributes>ctext</S> |
This generates the <SAMP> and </SAMP> tags, which direct the browser to render the text they surround in monospace font.
Table 1-74 htp.sample
Properties | Definitions |
---|---|
Syntax: |
htp.sample ( ctext in varchar2 cattributes in varchar2 DEFAULT NULL); htf.sample (ctext, cattributes) return varchar2; |
Parameters: |
ctext - the text to render in monospace font. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<SAMP cattributes>ctext</SAMP> |
This generates the <SCRIPT> and </SCRIPT> tags, which contain a script written in languages such as JavaScript and VBscript.
Table 1-75 htp.script
Properties | Definitions |
---|---|
Syntax: |
htp.script( cscript in varchar2 clanguage in varchar2 DEFAULT NULL); htf.script(cscript, clanguage) return varchar2; |
Parameters: |
cscript - the text of the script. This is the text that makes up the script itself, not the name of a file containing the script. clanguage - the langauge in which the script is written. If this parameter is omitted, the user's browser determines the scripting language. |
Generates: |
<SCRIPT LANGUAGE=clanguage>cscript</SCRIPT> |
Example: |
htp.script ('script text here', 'Javascript');
generates:
<SCRIPT LANGUAGE=Javascript>"script text here"
</SCRIPT>
This causes the browser to run the script enclosed in the tags.
|
This generates the <SMALL> and </SMALL> tags, which direct the browser to render the text they surround using a small font.
Table 1-76 htp.small
Properties | Definitions |
---|---|
Syntax: |
htp.small( ctext in varchar2 cattributes in varchar2 DEFAULT NULL); htf.small(ctext, cattributes) return varchar2; |
Parameters: |
ctext - the text to render in a small font. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<SMALL cattributes>ctext</SMALL> |
This generates the <STRIKE> and </STRIKE> tags, which direct the browser to render the text they surround in strikethrough type.
Table 1-77 htp.strike
Properties | Definitions |
---|---|
Syntax: |
htp.strike( ctext in varchar2 cattributes in varchar2 DEFAULT NULL); htf.strike(ctext, cattributes) return varchar2; |
Parameters: |
ctext - the text to be rendered in strikethrough type. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<STRIKE cattributes>ctext</STRIKE> |
This generates the <STRONG> and </STRONG> tags, which direct the browser to render the text they surround in bold.
Table 1-78 htp.strong
Properties | Definitions |
---|---|
Syntax: |
htp.strong ( ctext in varchar2 cattributes in varchar2 DEFAULT NULL); htf.strong (ctext, cattributes) return varchar2; |
Parameters: |
ctext - the text to be emphasized. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<STRONG cattributes>ctext</STRONG> |
This generates the <STYLE> and </STYLE> tags, which include a style sheet in your Web page. Style sheets are a feature of HTML 3.2. You can get more information about style sheets at http://www.w3.org
. This feature is not compatible with browsers that support only HTML versions 2.0 or earlier. Such browsers will ignore this tag.
This generates the <SUB> and </SUB> tags, which direct the browser to render the text they surround as subscript.
Table 1-80 htp.sub
Properties | Definitions |
---|---|
Syntax: |
htp.sub( ctext in varchar2 calign in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL); htf.sub(ctext, calign, cattributes) return varchar2; |
Parameters: |
ctext - the text to render in subscript. calign - the value for the ALIGN attribute. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<SUB ALIGN="calign" cattributes>ctext</SUB> |
This generates the <SUP> and </SUP> tags, which direct the browser to render the text they surround as superscript.
Table 1-81 htp.sup
Properties | Definitions |
---|---|
Syntax: |
htp.sup( ctext in varchar2 calign in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL); htf.sup(ctext, calign, cattributes) return varchar2; |
Parameters: |
ctext - the text to render in subscript. calign - the value for the ALIGN attribute. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<SUP ALIGN="calign" cattributes>ctext</SUP> |
This generates the <CAPTION> and </CAPTION> tags, which place a caption in an HTML table.
Table 1-82 htp.tableCaption
Properties | Definitions |
---|---|
Syntax: |
htp.tableCaption ( ccaption in varchar2 calign in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL); htf.tableCaption (ccaption, calign, cattributes) return varchar2; |
Parameters: |
ccaption - the text for the caption. calign - the value for the ALIGN attribute. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<CAPTION ALIGN="calign" cattributes>ccaption</CAPTION> |
This generates the <TD> and </TD> tags, which insert data into a cell of an HTML table.
Table 1-83 htp.tableData
Properties | Definitions |
---|---|
Syntax: |
htp.tableData ( cvalue in varchar2 DEFAULT NULL calign in varchar2 DEFAULT NULL cdp in varchar2 DEFAULT NULL cnowrap in varchar2 DEFAULT NULL crowspan in varchar2 DEFAULT NULL ccolspan in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL); htf.tableData (cvalue, calign, cdp, cnowrap, crowspan, ccolspan, cattributes) return varchar2; |
Parameters: |
cvalue - the data for the cell in the table. calign - the value for the ALIGN attribute. cdp - the value for the DP attribute. cnowrap - if the value of this parameter is not NULL, the NOWRAP attribute is added to the tag. crowspan - the value for the ROWSPAN attribute. ccolspan - the value for the COLSPAN attribute. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<TD ALIGN="calign" DP="cdp" ROWSPAN="crowspan" COLSPAN="ccolspan" NOWRAP cattributes>cvalue</TD> |
This generates the <TH> and </TH> tags, which insert a header cell in an HTML table. The <TH> tag is similar to the <TD> tag, except that the text in the rows are usually rendered in bold type.
Table 1-84 htp.tableHeader
Properties | Definitions |
---|---|
Syntax: |
htp.tableHeader ( cvalue in varchar2 DEFAULT NULL calign in varchar2 DEFAULT NULL cdp in varchar2 DEFAULT NULL cnowrap in varchar2 DEFAULT NULL crowspan in varchar2 DEFAULT NULL ccolspan in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL); htf.tableHeader (cvalue, calign, cdp, cnowrap, crowspan, ccolspan, cattributes) return varchar2; |
Parameters: |
cvalue - the data for the cell in the table. calign - the value for the ALIGN attribute. cdp - the value for the DP attribute. cnowrap - if the value of this parameter is not NULL, the NOWRAP attribute is added to the tag. crowspan - the value for the ROWSPAN attribute. ccolspan - the value for the COLSPAN attribute. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<TH ALIGN="calign" DP="cdp" ROWSPAN="crowspan" COLSPAN="ccolspan" NOWRAP cattributes>cvalue</TH> |
This generates the <TABLE> and </TABLE> tags, which define an HTML table.
Table 1-85 htp.tableOpen, htp.tableClose
Properties | Definitions |
---|---|
Syntax: |
htp.tableOpen ( cborder in varchar2 DEFAULT NULL calign in varchar2 DEFAULT NULL cnowrap in varchar2 DEFAULT NULL cclear in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL); htf.tableOpen (cborder, calign, cnowrap, cclear, cattributes) return varchar2; htp.tableClose; htf.tableClose return varchar2; |
Parameters: |
cborder - the value for the BORDER attribute. calign - the value for the ALIGN attribute. cnowrap - if the value of this parameter is not NULL, the NOWRAP attribute is added to the tag. cclear - the value for the CLEAR attribute. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<TABLE "cborder" NOWRAP ALIGN="calign" CLEAR="cclear" cattributes>
</TABLE> |
This generates the <TR> and </TR> tags, which inserts a new row in an HTML table.
Table 1-86 htp.tableRowOpen, htp.tableRowClose
Properties | Definitions |
---|---|
Syntax: |
htp.tableRowOpen ( calign in varchar2 DEFAULT NULL cvalign in varchar2 DEFAULT NULL cdp in varchar2 DEFAULT NULL cnowrap in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL); htf.tableRowOpen (calign, cvalign,cdp, cnowrap, cattributes) return varchar2; htp.tableRowClose; htp.tableRowClose return varchar2; |
Parameters: |
calign - the value for the ALIGN attribute. cvalign - the value for the VALIGN attribute. cdp - the value for the DP attribute. cnowrap - if the value of this parameter is not NULL, the NOWRAP attribute is added to the tag. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<TR ALIGN="calign" VALIGN="cvalign" DP="cdp" NOWRAP catttributes>
</TR> |
This generates the <TT> and </TT> tags, which direct the browser to render the text they surround in a fixed width typewriter font, for example, the courier font.
Table 1-87 htp.teletype
Properties | Definitions |
---|---|
Syntax: |
htp.teletype ( ctext in varchar2 cattributes in varchar2 DEFAULT NULL); htf.teletype (ctext, cattributes) return varchar2; |
Parameters: |
ctext - the text to render in a fixed width typewriter font. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<TT cattributes>ctext</TT> |
This generates the <TITLE> and </TITLE> tags, which specify the text to display in the titlebar of the browser window.
This generates the <UL> and </UL> tags, which define an unordered list. An unordered list presents items with bullets. Add list items with htp.listItem.
Table 1-89 htp.ulistOpen, htp.ulistClose
Properties | Definitions |
---|---|
Syntax: |
htp.ulistOpen ( cclear in varchar2 DEFAULT NULL cwrap in varchar2 DEFAULT NULL cdingbat in varchar2 DEFAULT NULL csrc in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL htf.ulistOpen (cclear, cwrap, cdingbat, csrc, cattributes) return varchar2; htp.ulistClose; htf.ulistClose return varhar2; |
Parameters: |
cclear - the value for the CLEAR attribute. cwrap - the value for the WRAP attribute. cdingbat - the value for the DINGBAT attribute. csrc - the value for the SRC attribute. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<UL CLEAR="cclear" WRAP="cwrap" DINGBAT="cdingbat" SRC="csrc" cattributes> </UL> |
This generates the <U> and </U> tags, which direct the browser to render the text they surround with an underline.
Table 1-90 htp.underline
Properties | Definitions |
---|---|
Syntax: |
htp.underline( ctext in varchar2 cattributes in varchar2 DEFAULT NULL); htf.underline(ctext, cattributes) return varchar2; |
Parameters: |
ctext - the text to render with an underline. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<U cattributes>ctext</U> |
This generates the <VAR> and </VAR> tags, which direct the browser to render the text they surround in italics.
Table 1-91 htp.variable
Properties | Definitions |
---|---|
Syntax: |
htp.variable ( ctext in varchar2 cattributes in varchar2 DEFAULT NULL); htf.variable (ctext, cattributes) return varchar2; |
Parameters: |
ctext - the text to render in italics. cattributes - other attributes to be included as-is in the tag. |
Generates: |
<VAR cattributes>ctext</VAR> |