?
Solved

How to output to two frames

Posted on 1998-06-19
8
Medium Priority
?
203 Views
Last Modified: 2013-12-25
I have set up two frames, one for a form and the other for the results/status. When I submit the form I want to output some information to one of the frames, and I want to output other information to the other frame. What is the HTML source code for this.

I'm writing my cgi code using C, but I think this should be language independent because I suspect the trick is in the HTML source code.

Thanks.
0
Comment
Question by:santama
[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
  • 4
  • 3
8 Comments
 
LVL 1

Accepted Solution

by:
RoboBob earned 400 total points
ID: 1829896
The trick is not to try to load each frame separately, but to redirect to the parent frame that contains the two frames, so you are loading the page that has the <FRAMESET> tags, which then loads the two frames that it contains...  (If this isn't very clear let me know and I can come up with some sample code...)
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 1829897
There are JavaScript ways and non-javascript ways
the first can be from one cgi, the second from the cgi + a file produced by the cgi...

I will let RoboBob get his say...

Michel
0
 

Author Comment

by:santama
ID: 1829898
RoboBob:

I really don't know much about html as I do about C/C++. So I think I'll take your offer on the sample source code.

Santama
0
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 1829899
RoboBob: I suspect your solution will include the writing and storing of files as in

a: calculate and store result.htm and info.htm
b: output frameset with
<FRAMESET ROWS="50%,*">
<FRAME SRC="result.htm">
<FRAME SRC="info.htm">
</FRAMESET>

This is not necessary if JavaScript is used...

Michel
0
 

Author Comment

by:santama
ID: 1829900
I'm really trying to avoid temp files.


0
 

Author Comment

by:santama
ID: 1829901
How about the JavaScript solution.
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 1829902
1. Use frames
<FRAMESET ROWS="50%,50%,*">
<FRAME NAME="result" SRC="/cgi-bin/calc.exe">
<FRAME NAME="cgistatus" SRC="empty.html">
</FRAMESET>

2. in your cgi, produce something like the following output:

print("<HTML>")
print("<HEAD>
print("<SCRIPT LANGUAGE='JavaScript'>")
print("top.frames[1].document.open();")
print("top.frames[1].document.write(%s);",status)
print("top.frames[1].document.close();")
print("</SCRIPT>")
print("</HEAD>")
print("<BODY>")
print("here comes your result:")

and so on

An alternative is using the http-header
Window-target: cgistatus

from a second cgi or a second call to the same cgi

Enjoy,

Michel

PS: If you accepted the answer by mistake, go to customer service and tell them
0
 

Author Comment

by:santama
ID: 1829903
Thanks Michel,

David.
0

Featured Post

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

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

Recently I have been answering a lot of questions like this in IT forums that I frequent. The question posed is usually something along the lines of "We have software X installed and need to uninstall it for reason Y" or some other variant of the sa…
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 …
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Suggested Courses

752 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