• Post author:
  • Post category:Apex
  • Reading time:1 mins read
Button properties in Oracle Apex.

In Oracle Apex, on button click, you want to open URL in a new tab. Here I am giving the example to perform this task using the Dynamic Action for a button.

Open URL in a New Tab on Button Click in Oracle Apex

Step-1: Create a button and set the properties highlighted in the below image:

Button properties in Oracle Apex.

Step-2: Now right click on the button you created and select Create Dynamic Action option. Then define the properties as shown in the below image:

Dynamic Action properties for a button.

As you can see in the above image that Action is set to Execute JavaScript Code and in the Code section, the following JavaScript code is written to open an URL in a New Tab on click of a button in Oracle Apex.

 

javascript:window.open('f?p=&APP_ID.:2:&APP_SESSION.','_blank');

The above JavaScript code will open the Page number 2 in the same application into a new tab window. Now save the changes and test.

You can use any URL here to open it in the new tab.

See also:

Vinish Kapoor

An Oracle Apex Consultant, Oracle ACE, and founder of foxinfotech.in and orclqa.com a question and answer forum for developers.

This Post Has 3 Comments

  1. Khandaker Imran Hossain
    Go to Button
    Go to button Behavior
    Action : Redirect to URL
    javascript:window.open('f?p=&APP_ID.:1:&SESSION.::NO:1:P1_PID:'+$v("P2_PID")+'');
    
    1. Vinish Kapoor

      Yes right, this way also can be done.

  2. MAHENDRA

    oracle apex
    how to open generated PDF/CSV file in New Browser Windows

Comments are closed.