W3C home > Mailing lists > Public > www-talk@w3.org > March to April 1996

Re: frames and cgi

From: ALASTAIR AITKEN CLMS <A.Aitken@unl.ac.uk>
Date: Tue, 23 Apr 1996 15:12:27 +0000 (GMT)
To: Andrew.Coles@it.newsint.co.uk
Cc: www-talk@w3.org
Message-Id: <01I3VV1418JM9UMXHE@grid.unl.ac.uk>
Andy Coles wrote,

>Does anyone know if there is a way of getting a cgi program to produce output
>to more than one frame. I tried using the multipart/mixed mime type along with
>a seperate Content-type and Window-target for each piece of the multipart
>document but this didn't work.

The following is a paragraph from a perl library.  C is capable of doing
this.  The frame control in the browser starts a new request to the server
for each document specified for each frame window.  Thus the "main" frame
gets a straight html document whilst the "menu" frame gets a cgi script to
execute to generate the document it contains.  Note this calls a second
script, with a security tag ($session_id).  This behaviour is very similar
to a browser establishing automatic requests for gifs or jpgs.

The frame handling is simpler than your example but the principle is the

sub print_frames
    print "Content-type:text/html\n\n";
    print "<html>\n<head>\n";
    print "<title>$header</title>\n";
    print "</head>\n";
    print "<frameset cols=\"26%,74%\">\n";
    print "<frame src=\"$bin/$menu_file?$session_id\" name=\"menu\">\n";
    print "<frame src=\"$html/$main_file\" name=\"main\">\n";
    print "</frameset>\n";
    print "<noframes>\n";
    print "<body>\n";
    print "<center>\n";
    print "<img src=\"http://www.unl.ac.uk/Images/logomin.gif\">\n";
    $title = "Browser Incompatibility report";
    print "<hr>\n";
    print "Your browser does not support frames.  You must return to the print menu and select the noframes options.";
    print "<hr>\n";
    print "</center>\n";
    print "</body>\n";
    print "<address>For further enquiries email: <a href=\"mailto:a.aitken\@unl.ac.uk\">Alastair Aitken ISS</a>\n";
    print "</address>\n";
    print "</body>\n";
    print "</noframes>\n";

Alastair Aitken a.aitken@unl.ac.uk www.unl.ac.uk/~alastair
Received on Tuesday, 23 April 1996 10:11:54 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:32:58 UTC