#!/usr/bin/perl use CGI; $query = new CGI; print $query->header; print $query->start_html('Popup Window'); if (!$query->param) { print "

Ask your Question

\n"; print $query->startform(-target=>'_new'); print "What's your name? ",$query->textfield('name'); print "

What's the combination?

", $query->checkbox_group(-name=>'words', -values=>['eenie','meenie','minie','moe'], -defaults=>['eenie','moe']); print "

What's your favorite color? ", $query->popup_menu(-name=>'color', -values=>['red','green','blue','chartreuse']), "

"; print $query->submit; print $query->endform; } else { print "

And the Answer is...

\n"; print "Your name is ",$query->param(name),"\n"; print "

The keywords are: ",join(", ",$query->param(words)),"\n"; print "

Your favorite color is ",$query->param(color),"\n"; } print qq{

Go to the documentation}; print $query->end_html;