MBA 683 E-Business Technology --

helper-1.adp
Home    Site Map    Search    EhrlichOrg.com

Syllabus    Classes    References  Examples  Student Info    Guest Info

 

<html>
<head>
<title>Helper Table Form Example</title>
</head>
<body>
It is now <%= [ns_fmttime [ns_time] "%A, %B %e, %Y at %r" ] %><p><hr><p>
<h2>Examples of forms created using database data</h2>
<%
# Drop down menu
ns_adp_puts "Drop down menu:<br><form method=get action=\"helper-2.adp\">
  <select name=\"course\">"
db_foreach t_row "select cn, ctitle from chuck.t order by ctitle" {
  ns_adp_puts "<option value=\"$cn\"> $cn: $ctitle"
}
ns_adp_puts "</select>&nbsp;&nbsp;<input type=submit value=\"Drop down\">
  </form><p>"
# Scrolling menu
ns_adp_puts "Scrolling menu:<br><form method=get action=\"helper-2.adp\">
  <select name=\"course\" size=4>"
db_foreach t_row2 "select cn, ctitle from chuck.t order by ctitle" {
  ns_adp_puts "<option value=\"$cn\"> $cn: $ctitle"
}
ns_adp_puts "</select>&nbsp;&nbsp;<input type=submit 
  value=\"Scrolling\"></form>"
# Scrolling menu, multiple 
ns_adp_puts "Scrolling menu allowing multiple selections:<br>
  <form method=get action=\"helper-2.adp\">
  <select name=\"course\" size=5 multiple>"
db_foreach t_row3 "select cn, ctitle from chuck.t order by ctitle" {
  ns_adp_puts "<option value=\"$cn\"> $cn: $ctitle"
}
ns_adp_puts "</select>&nbsp;&nbsp;<input type=submit 
value=\"Scrolling Mult\"></form>"
%>
<br>Note: the TCL library routines we are use only capture the last value selected.
<br><p><hr>
<a href="index.htm">/tech Home Page</a>
</body></html>

 

© 2001 by Chuck Ehrlich, all rights reserved.  Comments to webmaster.  Updated on October 14, 2000.