Button open app in a new tab

we all know there is option for links to open an app in a new application menu tab,

however i miss this option for macro sc_redir which i call from a php button.

I have the same request. How we can do this with sc_redir()
Guy G.

Myabe you can use some javascript to open the new tab, and call it via sc_ajax_javascript.

same here. this option would be a great feature. anyone?

You can do this, some code but it works.

  1. create a javascript function in the control/form where there is the button that execute the ajax code.
    I called this function jsopen_tab(param) with only one parameter.

    var func_menu_aba = null;
    var father = null; 
    father = window.top;
    if ( father ) {
        eval ("func_menu_aba = father.createIframe");
    if ( typeof func_menu_aba === 'function' ) {
     func_menu_aba('data_day_grid_'+param, 'Title '+param, '', '','', '../data_day_grid?current_activity='+param , 'form');
    } else {
     window.open( '../data_day_grid?current_activity='+param );	
  2. create in the form/control app a button that will run ajax-php code, and do whatever you want and instead of calla sc_redir call the function jsopen_tab to open the window

    // php code
    $value = {Testo};
    sc_ajax_javascript( 'jsopen_tab', array($value));

Done ! :sunglasses:


I will test soon


i have a similar problem when i use a button in the detail view of a calendar. to open a window from their i can choose between new window or in the same window (that is way to small for the form i want to open) is their any way i can open the new form in a tab also, but then close the detail page and open the new form as a tab next to the calendar?

Thanx for sharing, interesting to test.
i am sure SC uses some jscript to open the links. why do we need to reinvent the wheel?
all components should be 100% accessible via the code. obviously sc_redir was written before the links appeared somehow sc_redir was never updated with options that the links support. would be valuable addition to sc 10 :slight_smile:

BTW some SC dev forms like sorting by dragging, are not available in IDE, why is that?
This forum timeline on the right is nice too, why not add it to IDE?

1 Like