Solved

How to output to two frames

Posted on 1998-06-19
8
186 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
  • 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
 
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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Building Windows 10 1 76
How to Skip in FOR command if a Directory does not exist. 6 68
Adapting Windows 7 Image for all HDD size 7 82
Convert MSI to MSM 1 49
This tutorial will discuss fancy secure registration forms, with AJAX technology support. In this article I assume you already know HTML and some JS. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you mig…
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…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

919 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now