Hello,
I have a problem with bsp-views:
I open a new window via the JavaScript command
<script type="text/javascript" language="javascript">
open( "<%= controller->mv_srch_url%>",
"searchTask", "resizable=no, scrollbars=no,
status=yes, menubar=no, width=320, height=522,
top=50, left=50" );
</script>
If I close this window via the 'X' on the upper right corner of the window and want to open the popup again it doesn't work. This JavaScript command passes correctly but no window is opened.
If I close the popup via a button where a submit is made to the calling (parent) document and open it again, everything works fine.
Now I have two questions:
1. Does anybody have an idea why the popup cannot be opened again?
2. If not, I would like to make a submit if the popup is closed by the 'X'. I tried this in my bsp-view:
<script language="javascript">
function do_submit(){
var theForm = window.opener.document.getElementById("theForm");
theForm.submit();}
window.onUnload = do_submit
</script>
but it did not work.
I would be very grateful for any help.
Best regards,
Ralph
Message was edited by: Ralph Rillig
Catching the 'X' does not work, but opening the popup twice is working. I used the following coding:
open( "<%= controller->mv_srch_url%>",
"searchTask<%=sy-uzeit>", "resizable=no, scrollbars=no,
status=yes, menubar=no, width=320, height=522,
top=50, left=50" );
The problem is partly solved.
I can catch the closing window with the following java script coding and make a submit to the parent window.
function do_submit(){
var theForm = window.opener.document.getElementById("theForm");
theForm.submit();}
window.onunload = do_submit;
I don't know why it didn't work before, maybe because of the capital letter in 'onUnLoad'..?
Add a comment