[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Closing Windows that I've opened

Sorry... forgot crucial piece of info (see botton)

Mike Olivieri wrote:
> I've been having trouble closing a window that I've opened. Here
> are the relevant parts of my code:
> /* this function is called with the onSubmit event handler */
> /* I am trying here to create a new window so as to keep the old one
> active */
> function vehChg() {
>         newWin=window.open("", "veh_Win" ,"menubar");
>         document.VCHG.target="veh_Win";
>         document.VCHG.submit();
> }               /* VCHG is the name of my form */
> /*later in my data gathering flow, I want to close this window.
> It's no longer needed. */
> <form name=keep action="/cgi-bin/cgi2art.exe" method=post
> onSubmit="self.Close">
> <input type=submit name=KEEP value="Keep Changes">
> </form>
> <form name=Cancel action="/cgi-bin/cgi2art.exe" method=post
> onSubmit="veh_Win.Close">
> <input type=submit name=cncl value="Cancel">
> </form>
> I have used several different methods, all using a different window
> reference per the JS Authoring Guide, but can't seem to get the right
> one.  Using veh_Win.close() gets me the "veh_Win is not defined error", while self.close doesn't do ANYTHING. Any ideas?

When I close the new window (veh_Win) I want to specify a frame ("main") in the original 
window as the target.

For help about the list, please send a message to 'majordomo@obscure.org'
with the message body 'help'. To unsubscribe, send a message to
'majordomo@obscure.org' with the message body 'unsubscribe javascript'.
List archives and pointer to FAQ: http://www.obscure.org/javascript/