in reply to Embedding CGI into frames?

In one application where the majority of the work is done with Javascript, upon need the Javascript code builds up a form in one of the frames and submits it. The results then come back to the same frame and are displayed.

Some people have used invisible frames to interact with CGIs. It's just like normal CGI, except that you take care not to reset the frameset.

As for parameter sharing among frames, the usual idea is to have variables declared outside of the individual frames, plus some Javascript routines to manage transfering data around between the frames.

If I sound vague it's because it has been awhile set I set one of those up... three years since I last touched it. Here's some disconnected (and ugly (and old (very old))) snippets: From the first CGI:

sub CopyHTMLToBrowserPart1 { print <<"EOT"; Content-type: text/html <HTML><HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-88 +59-1"> <META NAME="Copyright" CONTENT="Copyright (C) 1998 Yes-sir-this- +is-my-baby Consulting All rights reserved."> <META NAME="Author" CONTENT="me"> <META NAME="Description" CONTENT="Page to select administration ac +tions"> <TITLE>Paging Database Maintenance</TITLE> <SCRIPT LANGUAGE="JavaScript" SRC="${PagingAIJSPathWWW}vars.js" ></S +CRIPT> <SCRIPT LANGUAGE="JavaScript" SRC="${PagingAIJSPathWWW}util1.js" ></S +CRIPT> <SCRIPT LANGUAGE="JavaScript" SRC="${PagingAIJSPathWWW}subsu1.js" ></S +CRIPT> <SCRIPT LANGUAGE="JavaScript" SRC="${PagingAIJSPathWWW}subs1.js" ></S +CRIPT> <SCRIPT LANGUAGE="JavaScript"> function initFromDatabaseValues() { EOT }
These are separate routines as in-between I build up and output the large Javascript data arrays.
sub CopyHTMLToBrowserPart2 { print <<"EOT"; } initFromDatabaseValues(); // Identify AI CGI version and datestamp versionAICGI = '1.12'; dateAICGI = 'Tuesday, June 27, 2000'; // Where to submit updates; where is Send-a-Page? var PageSubmitActionURL = '$PageSubmitActionURL'; var PageSendPageURL = '$PageSendPageURL'; // Flags identifying support for enhancements var AllowUserAliasEnhancements = $AllowUserAliasEnhancements; ::: ::: // Allow comments from CGI on first screen var InitialMessage ='$JSInitialMessage'; </SCRIPT> </HEAD> <FRAMESET ROWS="160,*" FRAMEBORDER="yes" FRAMESPACING=0 BORDER=3> <FRAME SRC="${PagingAIHTMLPathWWW}blanktop.html" NAME="ftop" MARGIN +HEIGHT=0 MARGINWIDTH=5 SCRO LLING="YES"> <FRAME SRC="${PagingAIHTMLPathWWW}blankbot.html" NAME="fbot" MARGIN +HEIGHT=0 MARGINWIDTH=5 SCRO LLING="YES"> </FRAMESET> <NOFRAMES> Sorry, this page requires that you have a frames-capable browser.<BR> You will not be able to use these facilities. <P> The Netscape Navigator 3.x and Internet Explorer 3.x programs are able to display frames. Please install one of these or a more recent version. </NOFRAMES> </HTML> EOT File blanktop.html basically immediately fetches good stuff, kicking o +ff by using a Javascript onLoad="" event: <HTML><HEAD><TITLE></TITLE></HEAD> <BODY BGCOLOR="WHITE" onLoad="top.OnLoadBlankPageTop()"> </BODY></HTML>
All this was patched together from various books and hints around the web. The books are better now, I suppose. Good luck.