Re: New window for a CGI: thought Q & A

by David Mintz <mambomintz(at)yahoo.com>

 Date:  Fri, 10 Nov 2000 15:24:39 -0800 (PST)
 To:  hwg-languages(at)hwg.org
  todo: View Thread, Original
I had the same question myself, and appreciate the
answer. Then I posed this question to myself: why does
this work?

Then I hypothesized this answer: the onSubmit event
fires before Submit really happens. Javascript, being 
client-side, gets a crack at creating the target
window before the cgi program is invoked on the
server, and by the time the cgi returns a response to
the browser, the browser knows where to display it. 

Am I right, more or less?

David Mintz
Spanish Interpreter, US District Court
Southern District of New York
Web Design & Hosting http://dmintzweb.com/
Personal http://panix.com/~dmintz/

--- Cyanide _7 <leo7278(at)hotmail.com> wrote:
> upon submitting the form, open a blank window with
> the same name as the 
> target of the form. that way once the window is
> created, the form should 
> automatically send its data to the new window via
> GET or POST:
> 
> <script>
> <!--
> function openWin(form){
>  
>
window.open('',form.target,"width=200,height=200,left=20,top=20");
>   return true;
> }
> //-->
> </script>
> 
> <form action="listserv.pl" method="POST"
> target="foobar"
>       onSubmit="return openWin(this);">
> <input type="text" name="email">
> <input type="checkbox" name="subscribe">
> </form>
> 
> kinda along those lines. - Cyanide_7
> 


__________________________________________________
Do You Yahoo!?
Thousands of Stores.  Millions of Products.  All in one Place.
http://shopping.yahoo.com/

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA