[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

dynamic content for frames without making files

Posted on 1997-10-30
4
Medium Priority
?
148 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Suggested Courses

656 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