summaryrefslogtreecommitdiff
path: root/web/src/cgi.tcl-1.10/example/frame.cgi
blob: f8338b47cef897391e2f97c4f7ea543f4fbb0abf (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
32
#!/depot/path/tclsh

# This is a CGI script that creates some frames.

package require cgi

cgi_eval {
    source example.tcl
    cgi_input

    cgi_title "Frame example"

    # allow URL's of the form  ;# frame.cgi?example=....
    # so as to override default
    set example examples  ;# default is the examples page itself!!
    catch {cgi_import example}

    cgi_frameset rows=100,* {
	cgi_frame =$CGITCL
	cgi_frameset cols=200,* {
	    cgi_frame =examples.cgi?framed=yes
	    cgi_frame script=$example.cgi
	}
    }
    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."
    }
}