Class 4 — CSS drop down menus — HTML form elements
CSS drop down menus
This example that shows how a one-level sub-menu can be constructed.
It has a simple structure but the drawback of this method is that it is
difficult to extend to more levels. one-level sub-menu
This section is not discussed until we have completed Javascript but is here
for comparison with the previous examples.
The example shows the use of mouse actions to call Javascript functions
to make menus visible and invisible. The length of time a menu is
displayed is controlled by a timer. Can create sub-sub-menus but
the Javascript becomes complex as you have to not hide parent menus
but the current version does hide parent menus. Sub-menus with Javascript
HTML form elements
Form element detail. Forms use Javascript to
read and process the fields before submission to the host site.
A simple form with name, password and email fields —
Example 1.
A form showing many different fields and ways of dealing with fields —
Example 2.
For those who are interested here is the cgi script that processes the above
forms —
cgi script. The file
extension is text because browsers prevent people from displaying files with
extensions cgi and php.