Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FRAMES + method POST 1

Status
Not open for further replies.

jet4135

Programmer
Oct 25, 2001
6
FR
Hi,

I need to display the result of a cgi called with POST method in a Frame .

Is it possible or not, and what is the syntax ?

Thanks



 
<form ... target=&quot;framename&quot;> ?? Victor
 
Well, if you're calling the CGI in the same frame, there is no syntax. The frame will navigate to whatever you have in the action parm within the form tag. If you want to submit to a page from one frame and have the results be displayed in another, I'm pretty sure that you can just use the target property in the form tag.
Code:
<form method=&quot;post&quot; action=&quot;123.cgi&quot; target=&quot;framename&quot;>
ToddWW
 
Sorry Vic, I didn't see your reply when I started mine. I think we were replying at the same time.. :)

ToddWW
 
yea, i've been cought this way many many times, you should't be so very sorry :))

your explanation is much more descriptive than my reply though, i'm just too lazy/buzy Victor
 
Thanks,

My problem is a little more difficult :

See above the code generated by my cgi :

<HTML><HEAD><TITLE>SIPS</TITLE></HEAD><FRAMESET ROWS=&quot;60%,40%&quot; FRAMEBORDER=&quot;YES&quot;>
<FRAME SRC=/cgi-bin/cgi1?VAR1=toto&var2=tuiti NAME=HAUT MARGINWIDTH=0 MARGINHEIGHT=0 SCROLLING=AUTO>
<FRAME SRC=&quot;/images//VIDE.html&quot; NAME=&quot;BAS&quot; MARGINWIDTH=&quot;0&quot; MARGINHEIGHT=&quot;0&quot; SCROLLING=&quot;AUTO&quot;></FRAMESET></HTML>

I would like to replace the first Frame by an other call to my cgi with a post method, because one value is too long.

 
You could go ahead and load a page with a hidden form in that frame and have JavaScript post the page immediately after the page loads.

Something like this..
Code:
<HTML><HEAD><TITLE>SIPS</TITLE></HEAD><FRAMESET ROWS=&quot;60%,40%&quot; FRAMEBORDER=&quot;YES&quot;>
<FRAME SRC=&quot;somepage.htm&quot; NAME=HAUT MARGINWIDTH=0 MARGINHEIGHT=0 SCROLLING=AUTO>
<FRAME SRC=&quot;/images//VIDE.html&quot; NAME=&quot;BAS&quot; MARGINWIDTH=&quot;0&quot; MARGINHEIGHT=&quot;0&quot; SCROLLING=&quot;AUTO&quot;></FRAMESET></HTML>
And write this html in somepage.htm
Code:
<html>
<head>
<script Language=&quot;JavaScript&quot;>
<!--
function postForm() {
  document.forms[0].submit();
}
//-->
</head>
<body onLoad=&quot;postForm();&quot;>
Please Wait ..
<form action=&quot;/cgi-bin/cgi1&quot; method=&quot;post&quot;>
<input type=&quot;hidden&quot; name=&quot;VAR1&quot; value=&quot;toto&quot;>
<input type=&quot;hidden&quot; name=&quot;var2&quot; value=&quot;tuiti&quot;>
</form>
</body>
</html>

ToddWW
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top