mattybrigh
asked on
onSubmit window.close?
I have a page that opens up a new window. Here's that code:
<a href="javascript:;" onClick="window.open('adde dit.asp?id =<%=RS("id ")%>','inv entory','t oolbars=no ,status=no ,scrollbar s=no,heigh t=275,widt h=550');"> <%=RS("ite m_name")%> </a>
This works fine, but when the user edits what's in that window, it doesn't close. Can someone tell me what might be wrong with this code?
<form action="submit.asp" method="post" OnSubmit="window.parent.cl ose();wind ow.close() ;return confirm_delete()">
Any help is greatly appreciated...
<a href="javascript:;" onClick="window.open('adde
This works fine, but when the user edits what's in that window, it doesn't close. Can someone tell me what might be wrong with this code?
<form action="submit.asp" method="post" OnSubmit="window.parent.cl
Any help is greatly appreciated...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hmmm...didn't seem to work. The form works, but once you submit the changes, it goes back to the default.asp page in the popup window.
or even better, add the close statement to the confirm_delete() function just before "return true" in the function.
Then all you need to do is: onsubmit="return confirm_delete();"
Then all you need to do is: onsubmit="return confirm_delete();"
can you clarify what you are asking for please?
ASKER
I have a page with items on it, the user will click on an item to edit it. When it's clicked, it opens up a new window (inventory). They do all their stuff and then when they click the "Edit Inventory Item", the window is supposed to close. This doesn't happen. It just displays the default.asp page (the one with all the items on it) in the popup window.
ASKER
Ok, I figured it out. There were two forms on the page, the first one for the majority of the fields and a second one that was only used if you delete and item. I was placeing all of that information there.
Thanks for the help and enjoy the points!
Thanks for the help and enjoy the points!
thanks!
<form action="submit.asp" method="post" OnSubmit="window.open('','