diff options
author | Eduardo Chappa <echappa@gmx.com> | 2013-02-03 00:59:38 -0700 |
---|---|---|
committer | Eduardo Chappa <echappa@gmx.com> | 2013-02-03 00:59:38 -0700 |
commit | 094ca96844842928810f14844413109fc6cdd890 (patch) | |
tree | e60efbb980f38ba9308ccb4fb2b77b87bbc115f3 /web/src/cgi.tcl-1.10/example/form-tour-result.cgi | |
download | alpine-094ca96844842928810f14844413109fc6cdd890.tar.xz |
Initial Alpine Version
Diffstat (limited to 'web/src/cgi.tcl-1.10/example/form-tour-result.cgi')
-rwxr-xr-x | web/src/cgi.tcl-1.10/example/form-tour-result.cgi | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/web/src/cgi.tcl-1.10/example/form-tour-result.cgi b/web/src/cgi.tcl-1.10/example/form-tour-result.cgi new file mode 100755 index 00000000..d1278ecf --- /dev/null +++ b/web/src/cgi.tcl-1.10/example/form-tour-result.cgi @@ -0,0 +1,69 @@ +#!/depot/path/tclsh + +# This is a CGI script that shows the result of the form tour. + +package require cgi + +cgi_eval { + source example.tcl + + cgi_input + cgi_title "Form Element Tour Results" + + cgi_body { + h4 "This is a report of variables set by the form tour." + + if {0!=[catch {cgi_import Foo0}]} { + h5 "Error: It appears that you have invoked this script + without going through [cgi_url "the intended form" [cgi_cgi form-tour]]." + cgi_exit + } + + catch { + cgi_import Map.x + cgi_import Map.y + puts "image button coordinates = ${Map.x},${Map.y}[nl]" + } + + catch { + cgi_import Action + puts "submit button Action=$Action[nl]" + br + } + + foreach x {version A B C D} { + catch { + cgi_import $x + puts "radio button \"$x\": [set $x][nl]" + } + } + catch { + cgi_import VegieList + puts "checkbox Vegielist = $VegieList[nl]" + } + for {set i 0} {$i<=6} {incr i} { + set var Foo$i + cgi_import $var + puts "text $var:" + cgi_preformatted { + puts [set $var] + } + } + for {set i 0} {$i<=9} {incr i} { + set var Foo1$i + cgi_import $var + puts "textvar $var:" + cgi_preformatted { + puts [set $var] + } + } + catch { + cgi_import Foo + puts "select pull-down Foo: $Foo[nl]" + } + catch { + cgi_import FooList + puts "select scrolled list FooList: $FooList[nl]" + } + } +} |