NAME redirect - allows a client to select different web pages from within
a 'drop-down' menu format. SYNOPSIS
<FORM METHOD='GET' ACTION='/cgi-bin/redirect?[+[options]]'>
<SELECT NAME=''...>
<OPTION VALUE=...>...</OPTION>
</SELECT>
</FORM>
where 'options' includes any order of the characters [+]. Brackets []
are used in this document to denote optional values and are not used in
the actual syntax. AVAILABILITY
http://www.eiu.edu • http://www.ux1.eiu.edu • http://www.pen.eiu.edu
• http://www.research.eiu.edu
DESCRIPTION The script allows web developers to use the built-in 'drop-down' menus
in HTML forms to list any number of links to other web pages within a
single line of text. Aside from assigning the form tag to use the script,
the only specific requirement is to set the name of the menu to be 'url'.
No other types of input options can be included in the form. Only the
value selected from the 'url' menu will be processed by the script. OPTIONS Any combination of options is prefixed by a single '+' and includes any
order of the following case-sensitive letters.
++ |
Display the current documentation and disable
all other actions of the script. |
USAGE To create a drop-down menu that provides links, for example, to various
state universities, create a form with the following information. Please
note the case of the letters in the values for the <...ACTION='/cgi-bin/redirect'>
and <SELECT NAME='url'...> tags.
<FORM METHOD='GET' ACTION='/cgi-bin/redirect'>
<SELECT NAME='url' SIZE='1'>
<OPTION SELECTED VALUE='http://www.eiu.edu/'>Eastern Illinois
University</OPTION>
<OPTION VALUE='http://www.ilstu.edu/'>Illinois State University</OPTION>
<OPTION VALUE='http://www.niu.edu/'>Northern Illinois University</OPTION>
<OPTION VALUE='http://www.siu.edu/'>Southern Illinois University</OPTION>
<OPTION VALUE='http://www.uic.edu/'>University of Illinois (UIC)</OPTION>
<OPTION VALUE='http://www.uis.edu/'>University of Illinois (UIS)</OPTION>
<OPTION VALUE='http://www.uiuc.edu/'>University of Illinois (UIUC)</OPTION>
<OPTION VALUE='http://www.wiu.edu/'>Western Illinois University</OPTION>
</SELECT>
<INPUT TYPE='submit' value='Go'>
</FORM>
Once the selection has been made, there are no other options for the
user to make other than to submit the form because the form can only have
this one drop-down menu. To eliminate the need for a Go button, make the
following additions and changes to your web page. This method uses JavaScript,
the code between the <SCRIPT>...</SCRIPT> tags and the modified
<SELECT NAME='url'...> tag, and may not be supported by all web
browsers. In this event the code between the <NOSCRIPT>...</NOSCRIPT>
tags will reinsert the 'Go' (submit) button. Again, note the case of the
letters for the values in the <...ACTION='/cgi-bin/redirect'> and
<SELECT NAME='url'...> tags.
<script>
<!--//
function gotopage(page) {
if (page != "") {
self.location=page
}
}
//-->
</script>
<FORM METHOD='GET' ACTION='/cgi-bin/redirect'>
<SELECT NAME='url' SIZE='1' onChange='gotopage(this.options[this.selectedIndex].value)'>
<OPTION SELECTED VALUE='http://www.eiu.edu/'>Eastern Illinois
University</option>
<OPTION VALUE='http://www.ilstu.edu/'>Illinois State University</option>
<OPTION VALUE='http://www.niu.edu/'>Northern Illinois University</option>
<OPTION VALUE='http://www.siu.edu/'>Southern Illinois University</option>
<OPTION VALUE='http://www.uic.edu/'>University of Illinois (UIC)</option>
<OPTION VALUE='http://www.uis.edu/'>University of Illinois (UIS)</option>
<OPTION VALUE='http://www.uiuc.edu/'>University of Illinois (UIUC)</option>
<OPTION VALUE='http://www.wiu.edu/'>Western Illinois University</option>
</SELECT>
<NOSCRIPT>
<INPUT TYPE='submit' VALUE='Go'>
</NOSCRIPT>
</FORM>
FILES There are no files directly associated with the operation of the script
other than the web pages referenced by the developer in the 'drop-down'
menu. SEE ALSO
CGI Suite (Collection of General Purpose Scripts)
DIAGNOSTICS redirect was developed to handle all types of user-, owner-, and server-related
errors. The script will send back to the client various well-behaved error
messages that will diagnose problems in creating the 'drop-down' menu
form. WARNINGS The value for the name of the menu in the <SELECT NAME='url'...>
tag cannot be altered from 'url'. NOTES redirect has been tested without problem on Windows NT Workstations with
Netscape Communicator 4.x and Microsoft Internet Explorer 3.x web browsers.
Older versions of these and other browsers that do not support JavaScript
and Cascading Style Sheets will not display the response messages and
documentation as fully designed. This browser limitation, however, has
no effect on the function of the script. BUGS There are no known bugs in the current version. AUTHOR Gerald Charles Wagner. Version 2.0 (Release October 1998). |