delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/06/04/14:22:27

Date: Thu, 4 Jun 1998 13:20:48 -0500 (CDT)
From: Andrew Deren <aderen AT eecs DOT uic DOT edu>
To: Dim Zegebart <zager AT post DOT comstar DOT ru>
cc: "djgpp AT delorie DOT com" <djgpp AT delorie DOT com>
Subject: Re: HTML question (a bit off-topic ;)
In-Reply-To: <3576CE51.A5B9BDB3@post.comstar.ru>
Message-ID: <Pine.GSO.3.96.980604131926.3608A-100000@ernie.eecs.uic.edu>
MIME-Version: 1.0

I don't know if that will work with CGI, but it works with ICL (SQL
database language):
in your form tag add:
TARGET="frame_name"

On Thu, 4 Jun 1998, Dim Zegebart wrote:

> Hi,
> excuse me for slightly off-topic question, but it has some relation to
> 'C' too.
> So,
> I have created a html document with two frames in it which split screen
> horizontaly.
> Top frame contains form with various fields wich I send to my postgresql
> backend via
> cgi script written in C. Everething is fine and work properly exept one
> thing -
> cgi script return html page which I want to see in lower frame, but
> instead of it
> it displayed in top frame overwriting my form :(
> My question is : How can I redirect output from cgi script which was
> called via
> _SUBMIT_ button as an _ACTION_ to the frame different from original
> form-contained one.
> 
> Thanks in advance.
> 
> PS.
> I know two and one not elegant sulutions :
> 1. I don't use _SUBMIT_ button. Just button with javascript function
> attached.
> In this function I parse all form's data, pass it char by char frought
> javascript.escape() function
> end send resulting string as param to cgi script like this :
> var cmd='http://foo/cgi-bin/boo?'+form_data_constructed_string
> parent.frames['my_frame'].location=cmd;
> This is work !
> 2. At cgi script I just reproduce my original document with frames and
> form plus query result and pass it back
> to browser.
> This is work too but not elegant at all !
> 3.At <form> tag I add 'target' attribute (not documented) like this
> <form name='myform' method=GET action='http://foo/cgi-bin/boo' target=>
> ...
> </form>
> In this case Netscape will open a new window and displayed result in it.
> 
> /
> --
> ____ ____
> |   \   /   Dim Zegebart
> ____/____
> 
> Moscow Russia
> WWW - http://www.geocities.com/siliconvalley/pines/7817
> DZcomm - comm library for Allegro
> Palantir - multitasking kernel for Allegro (based on PDMLWP)
> 
> 
> 

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019