SUBROUTINE LABEL2
* Display a simple form, requesting entry of a name in single
* Editbox. The Editbox has an associated label, set up to be
* fully functional in IE6.

* Include the RealWeb definitions.
INCLUDE #RW.INCLUDE.DEFS FROM /SYSFILES/REALWEB,BP

* Start the HTML page.
CALL RW_START_HTML_PAGE("Label example (IE6)", "", "", "", "")

* Prompt the user.
CALL RW_PUT("Please enter your name in the box, then click the Go button")

* Start the form.
CALL RW_START_HTML_FORM("HELLO","FORM1","")

* To get full functionality in IE6, we need to give our Editbox an id.
txtName = ""
CALL RWA_EDIT_BOX(txtName, "txtName", 30, "ID=txtName")
* Then we don't enclose the EditBox in the label, but instead point
* to the Editbox by setting the label's 'for' attribute to the
* Editbox's id.
lblName = ""
CALL RWS_LABEL(lblName, "Name: ", "for=txtName")
* Output the label and the Editbox.
CALL RW_PUT(lblName : txtName)

CALL RW_SUBMIT_BUTTON("GO","") ;* Give the form a submit button.

CALL RW_END_FORM ;* Complete the form.

CALL RW_END_PAGE ;* Complete the page.
RETURN
ClosedResult
ClosedHTML