santama
asked on
How to output to two frames
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.
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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
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
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
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
ASKER
I'm really trying to avoid temp files.
ASKER
How about the JavaScript solution.
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].docum ent.open() ;")
print("top.frames[1].docum ent.write( %s);",stat us)
print("top.frames[1].docum ent.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
<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].docum
print("top.frames[1].docum
print("top.frames[1].docum
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
ASKER
Thanks Michel,
David.
David.
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