|
htmlInputSubmit
Input submit button control class | [Previous] [Main] [Next] |
| htmlInputSubmit encapsulates the <INPUT TYPE="SUBMIT"></INPUT> tags. Submit buttons invoke the action component of a form, submitting data entered in controls on the form to a web server for processing.
| |
|
| |
| #include <dcmicro/htmlpp/submit.h>
| |
|
| |
|
| |
| htmlForm, htmlInputReset, htmlInputImage
| |
|
| |
| None.
| |
|
| |
| htmlInputSubmit()
| |
| Constructs an standard submit button object.
| |
|
| |
| htmlInputSubmit( const String& button_label )
| |
| Constructs a submit button object using display label button_label.
| |
|
| |
| htmlInputSubmit( const String& button_label, const String& name )
| |
| Constructs a submit button object named name, using display label button_label.
| |
|
| |
| virtual ~htmlInputSubmit()
| |
| Destroys the object.
| |
|
| |
| Label | htmlInputSubmit& Value(const String& button_label )
| |
| Sets the displayed button label value to button_label, and returns a reference to the object.
| |
|
| |
| Label | String Value() const
| |
| Returns the button label value as a string, or an empty string if not set.
| |
|
| |
| Name | htmlInputSubmit& Name(const String& name )
| |
| Sets the name used to reference the control on a form to name, and returns a reference to the object.
| |
|
| |
| Name | String Name() const
| |
| Returns the control name as a string, or an empty string if not set.
| |
|
| |
| Clone | htmlObject FAR * Clone() const
| |
| Returns a base-class pointer to a deep copy of the object.
| |
|
| |
|
| |
| See Also: Tutorial:Forms:Buttons
| |
|
| |
| #include <stdio.h>
| |
| #include <stdlib.h>
| |
| #include <dcmicro/htmlpp/htmlpp.h>
| |
|
| |
| int main( void )
| |
| {
| |
| htmlCgi server ;
| |
| htmlPage page( "html++ example application" ) ;
| |
|
| |
| // Create a form, setting the action
| |
| // statement to "/cgi-bin/formdemo"
| |
| htmlForm form( "/cgi-bin/formdemo" );
| |
|
| |
| // Set up input areas for last name,
| |
| // first name, and email address. Allow
| |
| // up to 20 characters for the names,
| |
| // and 30 characters for the email.
| |
| form << "Last Name: "
| |
| << htmlInputText( "lname", 20 )
| |
| << htmlBreak() ;
| |
|
| |
| form << "First Name: "
| |
| << htmlInputText( "fname", 20 )
| |
| << htmlBreak() ;
| |
|
| |
| form << "Email address: "
| |
| << htmlInputText( "email", 30 )
| |
| << htmlBreak() ;
| |
|
| |
| // Add a submit button with a custom label
| |
| form << htmlCenter( htmlInputSubmit("Press to continue") );
| |
|
| |
| page << form ;
| |
|
| |
| server << page ;
| |
| return 0 ;
| |
| }
| |
|
| |
|
| |
| Content-Type: text/html
| |
| <HTML>
| |
| <HEAD>
| |
| <TITLE>html++ form input example</TITLE>
| |
| </HEAD>
| |
| <BODY>
| |
| <FORM ACTION="/cgi-bin/formdemo" METHOD="POST">
| |
| Last Name: <INPUT TYPE="TEXT" NAME="lname" SIZE="20"><BR>
| |
| First Name: <INPUT TYPE="TEXT" NAME="fname" SIZE="20"><BR>
| |
| Email address: <INPUT TYPE="TEXT" NAME="email" SIZE="30"><BR>
| |
| <CENTER><INPUT TYPE="SUBMIT" VALUE="Press to continue"></CENTER></FORM>
| |
| </BODY>
| |
| </HTML>
| |
|
| |
| |
|
| |
|
| |
