Jump to content

Open new tab but stay on current page?


Recommended Posts

@SherzodI have application "A" that the user uses all day.
When it enters this application, I want to open another tab with application "B", but I need application A to remain on display.
I'm using UniSession.AddJS('window.open('
But it always automatically switches to application tab "B".
Is there a way to keep me in the "A" application tab?
Thanks!

Link to comment
Share on other sites

1-Place an unibutton
2- on uniButton Properties: | ClientEvents | ExtEvents | OnClick

 

function click(sender, e, eOpts)
{
    var a = document.createElement("a");
    a.href = window.location.pathname;
    var evt = document.createEvent("MouseEvents");
    //the tenth parameter of initMouseEvent sets ctrl key
    evt.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0,
                                true, false, false, false, 0, null);
    a.dispatchEvent(evt);

}

On Chrome, focus moves to next tab. See other solutions and adapt as you wish. It seems to be no more possible keep in the same table for security reasons in chrome. See below:
https://stackoverflow.com/questions/10812628/open-a-new-tab-in-the-background

 

 

Edited by Fred Montier
typos
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...