summaryrefslogtreecommitdiff
path: root/web/src/cgi.tcl-1.10/example/display-in-frame.cgi
blob: 6366957ee6eaa25e96ed66dcd2d4014fd877e2b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/depot/path/tclsh

# This is a CGI script that displays the results of other CGI scripts
# in a separate frame.  It is only used for a few rare examples such
# as image.cgi

package require cgi

cgi_eval {
    source example.tcl

    cgi_input

    cgi_head {
	set scriptname image.cgi
	catch {cgi_import scriptname}
	set scriptname [file tail $scriptname]
	cgi_title $scriptname
    }
    cgi_frameset rows=50%,50% {
	cgi_frame =$scriptname?header=1
	cgi_frame =$scriptname
    }
    cgi_noframes {
	cgi_h1 "uh oh"

	p "This document is designed to be viewed by a Frames-capable
	browser.  If you see this message your browser is not
	Frames-capable."
    }
}