PDA

Click to See Complete Forum and Search --> : Input into frame1. Output to frame2?


Al Smith
Dec 20th, 2000, 10:01 PM
Hi,
I have tried several permutations of various codes and have come close but still can't get this to work.
I have a page that contains two frames. The top frame is an input form for entering a part number. The form posts the part number to a database query which gathers several pieces of data about the part.
What I'm tryin to do is place the resulting data into a table on the lower frame. Then another part number can be entered and this new data is appended to the lower frame's table below the previous data. etc.
I'm using VB6 WebClasses (IIS applications) to create the pages.
Any ideas will be greatly appreciated.

Thanks,
Al.

Mark Sreeves
Dec 21st, 2000, 02:47 AM
Well, I don't know about using VB6 WebClasses but if I was using straight forward ASP I would try this:


put target=frame2 in the form tag of the input page


I expect you've got that bit already

Do the query on the database in the usual manner but append the results to a tempory table. You can then write the contents of this tempory table back out to the browser.

Al Smith
Dec 21st, 2000, 08:29 AM
Hi,
I too thought I could use a target in the form tag but it ends up over-writing frame1 no matter what I target.

Response.Write"<HTML>"
Response.Write"<FORM name=DataOut Target=Frame2>"
Response.Write"<TABLE>"
Response.Write"<TR><TD>" & ItemCode & "</TD><TD>" & Descript & "</TD></TR>"
Response.Write"</table>"
Response.Write"</form>"
Response.Write"</html>"

One of my attempts was to update the data and then re-write the updated page. This sort of works but I have a "Back" button on the form. Using the "Back" button now steps you back through each re-write. If I could figure out how to Refresh the form rather that re-writting it, this might work.
I even toyed with the idea of keeping track of the number of rewrites and changing the "Back" button command to go back that number of pages, but that's getting awfully ugly.
Thanks,
Al.

Mark Sreeves
Dec 21st, 2000, 09:18 AM
this posts stuff back into the second frame

top.html


<HTML>
<head>
<script language=javascript>
var i = 0;
function doIt()
{
parent.bottomMenu.location.href="http://sl00257/scratch/someother.asp?txt1=" + document.frm1.txt1.value + "&txt2=" + document.frm1.txt2.value;
}
</script>
</head>
<BODY>
<form name=frm1>

<input name=txt1>
<input name=txt2>

<INPUT TYPE="BUTTON" VALUE="Go" onClick="doIt()">

</form>
</body>
</HTML>


frames page


<frameset rows="100,*">
<frame name=frmTop src=top.html>
<frame name=bottomMenu src=bottom.html>
</frameset>



I'll have to have a think about the rest...

Al Smith
Dec 21st, 2000, 10:46 AM
Hi,
I finally got the target="frame2' to work. It turns out that the target needs to be in the form tag of my Input form, the one that's in frame1. e.g. <form target="Frame2" action="Webclass1.asp?WCE=event1" method="post">.

This works but I'm still fighting the history.back problem.
Thanks,
Al.