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 Callback on apex.submit()

m.davideAug 6 2014 — edited Aug 6 2014

Application Express 4.2.2.00.11


What I'm trying to achieve:

  • When a I click a link, the current page should be submitted then after loading open the link on a new tab.
  • Basically I want to simulate when the user clicks a tab but instead open to a new page.


What I've done so far:

  • I read about Javascript Callback and failed.
  • The link:
<a href="javascript:doSomething(2);">MEMBERSHIP</a>
  • The functions in js:

function submitAndGo(pageNo,callback){

  apex.submit();

  if(typeof callback == "function")

  followLink(pageNo);

function followLink(pageNo){

  var url = 'f?p=&APP_ID.:'+pageNo+':&APP_SESSION.::&DEBUG.';

  var win = window.open(url, '_blank');

  win.focus();

}

  • What happens:

When I click the link it automatically opens to a new tab without waiting for the main page to finish loading(still submitting).

This post has been answered by m.davide on Aug 6 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 3 2014
Added on Aug 6 2014
4 comments
3,862 views