Solved

How to output to two frames

Posted on 1998-06-19
8
198 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 100 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
Monthly Recap

May was a big month for new releases from Linux Academy! Take a look at what our team built recently in our blog. You can access the newest releases from our blog.

 
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

Quiz: What Do These Organizations Have In Common?

Hint: Their teams ended up taking quizzes, too.

Question has a verified solution.

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

Introduction This tutorial will give you a fast look what you can do with WhizBase. I expect you already know how to work with HTML at least, and that you understand the basics of the internet and how the internet works. WhizBase is a server-s…
I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
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 …

690 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