Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Javascript setTimeout problem

10368Jan 31 2009
Dear forum members,

I have a form, which is opened as a popup window. After submitting the popup, it closes and should reopen the calling window (refresh).

My code looks like this:
<script language="JavaScript" type="text/javascript">
<script language="JavaScript">
  function closeThisPopup(){
    window.opener.redirect('f?p=&APP_ID.:320:&SESSION.::NO::P320_PK:&P325_PK.');
    window.close();
  }

  function passBack2(){
    doSubmit('SUBMIT');
    setTimeout(closeThisPopup(),5000);
  }
</script>
Okay so far. Two things aren't working the way I supposed them to do:
1. The setTimeout method does NOT wait 5000ms=5 seconds.
2. This javascript code does refresh the contents of the calling window in about 30% of all trials. I suppose, that the commit takes more time than recalling the opener window.

How can improve this?

Any suggestions/comments welcome!

Best regards,
Johann
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 28 2009
Added on Jan 31 2009
0 comments
478 views