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>
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();
}
When I click the link it automatically opens to a new tab without waiting for the main page to finish loading(still submitting).