1 / 12

CS205

CS205. Tables & Forms. Tables. Basic <table>Syntax. <table cols = # of columns > <tr> defines one ROW <td></td> defines one CELL <td></td> </tr>    more rows    </table>. Important <TABLE> Options. border border thickness (e.g. 4) background bordercolor

jamesdixon
Download Presentation

CS205

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS205 Tables & Forms

  2. Tables

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

  4. Important <TABLE> Options • border border thickness (e.g. 4) • background • bordercolor • cellpadding/cellspacing • cols helps compute table width • frame borderaround whole table • rules cell borders • height • width

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

  6. Forms

  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

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

  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> • <td><input></input></td> • </tr> • </table> • </form>

  10. <Form> methods • Post • 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

  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

  12. CGI's • CGI programs can be written in: • 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

More Related