?
Solved

dynamic content for frames without making files

Posted on 1997-10-30
4
Medium Priority
?
147 Views
Last Modified: 2013-12-25
I intend to implement a CGI program that generates a web page with two frames, each frame containing one field that is slightly customized.   As I understand it, the frames always have to point to other documents.  Is that
correct?  I don't want to have to create two new documents that live on my server, every time some one calls my CGI program.  The server really has no use for the documents once they go to the browser.  Is there a way to do
"inline" frames?  

(Details: I only need to support Netscape; this is an intranet application with fairly sophisticated users.  I am embedding hidden fields, because one frame has buttons that cause changes to happen with a CGI program running in another frame, and the instances of these two CGI programs need to know who they're talking to. The CGI programs are written in C on Solaris for Apache.  I can generate new "temporary" documents if need be, but then I'll
need some sort of cleanup process to remove them, and I'm not sure when it's really safe to remove them, in case they reload the pages, etc.)

Thanks for helping.
0
Comment
Question by:steve_howell
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 84

Expert Comment

by:ozo
ID: 1831019
The frame documents can be CGI programs too
0
 
LVL 6

Accepted Solution

by:
alamo earned 400 total points
ID: 1831020
There's no need to generate 2 static documents - it's much easier to simply call yourself in those two frames, passing the needed arguments. For example, if the main page is loaded by

mycgi.exe?arg1=x&arg2=y

then have mycgi.exe check for a frame argument and if it's not found it writes the frameset with frames as:

<FRAME SRC="mycgi.exe?arg1=x&arg2=y&frame=1">
<FRAME SRC="mycgi.exe?arg1=x&arg2=y&frame=2">

If the frame argument is "1" you write frame 2's page, etc.

Since the primary invocation (the one which writes the frameset) makes all the decisions, you might need to add arguments to the secondary invocations that reflect that.  If it's easier for you to build separate CGIs rather than look for frame=x then instead frame1 could call mycgi1.exe and frame2 could call mycgi2.exe.

If for whatever reason the above isn't practical, you could also write the frame documents dynamically using Javascript in the main document. But in many ways that is more complicated, and is completely dependent on javascript being enabled.
0
 
LVL 6

Expert Comment

by:alamo
ID: 1831021
I posted my answer before I saw you comment, ozo, I wasn't tring to jump in.

Er, 'if the frame argument is "1" you write frame 2's page, etc' is a typo obviously. Or... let's see... I was using 0-based indexing. Yeah, that's it. That's the ticket.
0
 

Author Comment

by:steve_howell
ID: 1831022
Both ozo and alamo answered my question perfectly.  For some reason it was in my head that you couldn't do CGI from a frame src.  Glad to have it cleared up.  
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial will discuss the log-in process using WhizBase. In this article I assume you already know HTML. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you might look at some of my other articles abo…
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question