Session 7: HTML 3 - Desain Isi J0394 – Perancangan Situs Web Program Studi Manajemen Universitas Bina Nusantara Forms Basic parts of forms: the structure or shell: fields, labels, and buttons that the visitors sees on a page and hopefully fills out Processing script that takes information and converts it into a format that you can read or tally BWD Bina Nusantara University 2 Forms (2) Three important parts: FORM Tag, include URL of the CGI Script that will process the form The form elements, like fields and menus Submit button which sends the data to the CGI script on the server BWD Bina Nusantara University 3 Forms (3) Beginning TAG of Forms FORM METHOD=POST, GET ACTION=“script.url” ; script.url is the location on the server of the CGI script that will run when the form is submitted. BWD Bina Nusantara University 4 Forms (4) Text Box Password Box Text Area Radio Buttons Checkboxes Menus Submit/Reset Button Upload Files Hidden Fields to a Form BWD Bina Nusantara University 5 Scripts Scripts are little program that add interactivity to your page. You can write simple scripts to add an alert box or a bit of text to your page, or more complicated scripts that load particular pages according to your visitor’s browser or change a frame’s background color depending on where they point the mouse. It is the backbone of dynamic HTML (DHTML) BWD Bina Nusantara University 6 Scripts (s) Most scripts are written in JavaScript, which was developed by Netscape Communications. That is because JavaScript is the scripting language that is supported by most browser, including Communicator and Explorer. BWD Bina Nusantara University 7 Scripts (3) CGI – CGI (Common Gateway Interface) is simply a standardized way for sending information between the server and the script that is used to process form in a simple way. BWD Bina Nusantara University 8 Script (4) What does the CGI script do? – Element on forms: name and value; name identifies the data that is being sent, the value is the data or from the visitor who types in a field. – Function of CGI Script: (1) to take all those name value pairs and separate them out into individual intelligible pieces, (2) to actually do something with the data BWD Bina Nusantara University 9 Script (5) Getting a Script – The CGI Resoures Index: www.cgi_resources.com – Matt’s Script Archive: www.worldwidemart.com/scripts – Extropia.com: www.extropia.com – WebSripts Archive: www.awsd.com/scripts BWD Bina Nusantara University 10 Script (7) Preparing a script – Adapting scripts for your use – Transferring the script to the server – Permissions – Add it to your form BWD Bina Nusantara University 11