Click to See Complete Forum and Search --> : window close on form submit
TimmyD
06-16-2003, 08:37 AM
This is probably a no-brainer for most of you, but I'm pretty javascript ignorant, so can use some help. I have a form that pops up in a pop-up window. Once the users fills out the form and hits submit, I need for the form data to ba passed to the action page, and for the pop-up window to close. Any help would be appreciated. Currently, my body tag reads as:
<body onLoad="top.window.focus()">, and my form tag as
<form action="EditAction.cfm" method="post">.
AdamGundry
06-16-2003, 08:41 AM
I don't believe you can close the window before the form it contains is posted. On the page that is returned from the action server-side script, use the JS method window.close().
Adam
BTW, according to the WCAG you should not be using pop-up windows.
TimmyD
06-16-2003, 09:11 AM
This is an internal form, and the users asked for the pop-up window. Which is why I am using it. What is WCAG?
I'll play around a bit to see what I come up with to make this work.
AdamGundry
06-17-2003, 07:15 AM
WCAG stands for Web Content Accessibility Guidelines, a Recommendation from the World Wide Web Consortium which specifies good practice in making your pages accessibile. You can find out more here: http://www.w3.org/TR/WCAG10/
If this is for an internal form, I suppose the WCAG are less relevant, as you know exactly who your users are.
Good luck
Adam