Skip to Content
author's profile photo Former Member
Former Member

Open a view twice does not work

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" );

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Dec 02, 2004 at 12:21 PM

    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
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Ariel,

      thank you for your post, but it still doesn't work.

      My coding is as follows:

      <%

      if controller->mv_call_popup is not initial.

      clear controller->mv_call_popup.

      %>

      <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>

      <%

      endif.

      %>

      Also my second problem is not solved because the event 'window.onunload = do_submit;' is raised with every request on the bsp-view of the popup and not only with the click on the 'X' of the window.

      Ralph

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.