Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS205 Tables & Forms © 2004 D. J. Foreman.

Similar presentations


Presentation on theme: "CS205 Tables & Forms © 2004 D. J. Foreman."— Presentation transcript:

1 CS205 Tables & Forms © 2004 D. J. Foreman

2 Tables ©2004 D. J. Foreman

3 Basic <table>Syntax
<table cols=# of columns > <tr> defines one ROW <td></td> defines one CELL <td></td> </tr>    more rows    </table> ©2004 D. J. Foreman

4 Important <TABLE> Options
border border thickness (e.g. 4) background bordercolor cellpadding/cellspacing cols helps compute table width frame border around whole table rules cell borders height width ©2004 D. J. Foreman

5 Advanced <Table> Syntax
<TH align=… background=… bgcolor=… colspan=… rowspan=… valign=… width=…> <TD same options as TH> <caption align=…> Options only affect current cell ©2004 D. J. Foreman

6 Forms ©2004 D. J. Foreman

7 Basic <Form> Syntax -1
<form action=URL method=(post/get)> <input name="field1"> <select> <option value="value1"> </option>    more option tags    </select> </input> </form> Usually uses a TABLE to line up fields ©2004 D. J. Foreman

8 Caution Don't confuse the terminology: OPTION as a tag:
OPTION actually an attribute on a tag <BODY bgcolor='red'> ©2004 D. J. Foreman

9 Basic <Form> Syntax -2
<form action=URL method=(post/get)> URL is to locate the CGI program CGI = Common Gateway Interface <table> <tr> <td><input></input></td> </tr> </table> </form> ©2004 D. J. Foreman

10 <Form> methods Post Get preferred
data accessed via "standard input" (standard input/output is terminal I/O) Get less common (limited length) data passed as a parameter contains callers URL URL could be truncated ©2004 D. J. Foreman

11 <FORM> processing
User clicks a "submit" button Browser send data to server Server starts the CGI program Server gives data to CGI program CGI program "builds" a webpage Output via "standard output" Contains HTML tags AND text Server sends "page" to browser Browser displays page ©2004 D. J. Foreman

12 CGI's CGI programs can be written in: A CGI always runs on the server
Perl, Java, C++, C, etc. A CGI always runs on the server User cannot see the CGI program Sometimes called a "script" MS script files: anypage.ASP CGI Example: D. Foreman's CS105 grade calculator ©2004 D. J. Foreman


Download ppt "CS205 Tables & Forms © 2004 D. J. Foreman."

Similar presentations


Ads by Google