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

Closing Windows that I've opened



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.  Any ideas?

tia,
Mike
--------------------------------------------------------------------
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/