Chemistry 524 HTML Primer

Forms <FORM ACTION="url" METHOD=method [ENCTYPE=encrypt] [SCRIPT="url"] [TARGET="text"] [NAME="text"]> This is the start tag of a new form. ACTION is the URL of a cgi script, an email address, or a page to which the data will be sent. METHOD is either "post" or "get", depending how the data is to be sent. ENCTYPE is the encryption type, not often used. SCRIPT is a client-side URL script. TARGET is a Netscape extension which opens the result in a specified window or frame, read the Link chapter for more. NAME is an optional parameter which can be useful when languages like JavaScript are used. Must end with </FORM>. To convert the result of a mailto: form into readable text, I've written another program named Mailto Converter, also available from my homepage, Info-Mac and other shareware libraries on the net. The program can be downloaded from http://www.calles.pp.se/nisseb/mailto_converter.html, use it if you like. Note: If ACTION is not defined, Netscape will display an email window with your own subject. I'm not sure if this is an official feature, or if it is supported in all versions of the program. Input objects <INPUT [...]> INPUT is a form object, for example a field. The following parameters are allowed: NAME=text The name of the object. The result will be sent as 'name=value' TYPE=text Defines the object type. Can be either TEXT (Text field), INT (Number field), PASSWORD (Password field, characters is viewed as bullets, ¥), RADIO (radio button, only one can be selected), CHECKBOX (Selected or not), HIDDEN (A hidden textfield), FILE (A special button which will ask the user for a file to upload. This requires special cgi-scripts and servers.), SUBMIT (a button used to send the form), IMAGE (Imagemap as a submit button) and RESET (a button which reset all objects to their default values). A form must have at least one SUBMIT or IMAGE object. VALUE=text Is the default value of the object, for example "Hello" in a text field. If TYPE is RADIO or CHECK, VALUE is returned only if the radiobutton or checkbox is checked. May be used in all objects. [SIZE=n] Defines the width of the object in pixels. Not needed in all objects, for example not in buttons. [MAXLENGTH=n] Defines the maximum length of the value, for example 3 (characters). Needed in the same objects as used by the SIZE parameter. [CHECKED] Set the hilight of a radiobutton or checkbox to true as default. Not used in other objects. [SRC="url"] For use with TYPE=IMAGE only. Same as for the <IMG> tag. [ALIGN=right|center|left] Optional parameter for use with TYPE=IMAGE. Same as for <IMG>. Other form objects <SELECT NAME="text" [SIZE=n] [MULTIPLE]> Start tag for a popup button or list. Must end with </SELECT>. NAME is the object name and SIZE the number of visible rows. If the optional MULTIPLE parameter is used, the object will be a list. If not, it will show up as a popup button. Multiple items can be hilighted in a list by holding the command and control keys. Use the following tag within the <SELECT> tag: <OPTION [VALUE=text] [SELECTED]>text2 Defines a new popupmenu option. Don't end with </OPTION>! Value is the text to be sent, usually "text2". <TEXTAREA NAME=text [COLS=n] [ROWS=n] [WRAP=virtual|physical|off|soft|hard]> Insert a scrolling text field. COLS is the number or columns (horizontal characters). WRAP is a Netscape tag and sets the text alignment of the text field. OFF is the default option, which will insert horizontal scrollbars to the field. Using another parameter, the text will begin on a new line when reaching the right end of the field. Using physical or hard, the text will be sent wrapped. Using virtual or soft, the text will be viewed but not send wrapped. Must end with </TEXTAREA>. The text between the start and end tag is the default text in the field, for example <TEXTAREA>Hello</TEXTAREA>. (NS)