10

In Servicenow, I have a requirement to open a new window from a UI action. 1. Open in New window (not tab) 2. Display the navigation toolbar (buttons) 3. Display scrollbars 4. Be resizeable

Using var window = window.open(url, windowName, [windowFeatures]); appears to work fine in Chrome and Firefox, but in IE the window parameters are largely ignored. height and width seem to be the only ones that are adhered to. I am using Microsoft Edge 41.16299.248.0 and I cannot get a new window opened with the toolbar showing no matter what I try.

https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_win_open5 This is the test code:

myFunction() { window.open("https://www.google.com/search?q=help", "_blank", "toolbar=yes,width=600,height=400,left=600,top=500,status=yes,scrollbars=no,resize=no");

}

When I click the button, a new window opens, no toolbar, not positioned according to left/top, no status bar, I DO see scroll bars, and I CAN resize.

Here is an example from MSDN: https://msdn.microsoft.com/en-us/library/windows/desktop/ms644696%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396

According to MS, they've adopted " MDN Web Docs as the definitive place for useful, unbiased, browser-agnostic documentation for current and emerging standards-based web technologies. ", but I do not find any explanation of this issue I am experiencing. https://learn.microsoft.com/en-us/microsoft-edge/dev-guide

Is this a known issue with IE Edge or is there some sort of workaround available?

  • What settings do you have in about:flags for localhost loopback; Do you have any extensions installed and enabled? Whatis servicenow? An intranet site? – Rob Parsons Feb 19 '18 at 02:03
  • Hi Rob, I don't see flags under settings. As I mentioned, I am using Microsoft Edge 41.16299.248.0, no extensions installed. I have also tried the "Open in Internet Explorer" option - which launched IE version 11.248.16299.0 with the same results. – Mohammad Kadiwal Mar 04 '18 at 05:29
  • about:flags is an internal tab.....which has settings for localhost loopback.... you 'open' it by typing about:flags in the Edge Address bar... other browsers have a similar page eg. chrome://flags. – Rob Parsons Mar 08 '18 at 01:32

4 Answers4

0

ServiceNow has made public that some features will no longer be supported on Microsoft Edge. Why don't you try with another browser like Mozilla or Chrome? It never fails those two to me. Opera might have some issues too, so I don't advise using that one.

Here's the link about the supported browsers: https://docs.servicenow.com/bundle/paris-release-notes/page/administer/navigation-and-ui/reference/browser-support.html

Hope this information helped :D Cheers!

Pedro Leite
  • 21
  • 1
  • 6
0

Try using Glide Navigation API:

g_navigation.openPopup('incident_list.do?sysparm_query=active=true', 'Active Incidents', 'resizable,scrollbars,status', true);
Gabriel Anderson
  • 1,304
  • 14
  • 17
0

try this

function win_open1() {
    window.open('about:blank','','titlebar=yes,toolbar=yes,location=yes,status=no,menubar=yes,scrollbars=yes,resizable=yes,width=700,Height=300,left=0,top=0');
}
Lee Taylor
  • 7,761
  • 16
  • 33
  • 49
Isuru
  • 21
  • 5
0

We encountered the same issues. It turned out that if the "location=" parameter is included, Edge completely ignores all the parameters.

Removing that parameter allowed the others to work.

window.open (url, null,"height=200,width=200,status=yes,toolbar=yes,menubar=yes,location=yes,resizable=yes");

Fails - window opens with same size as parent window.

window.open (url, null,"height=200,width=200,status=yes,toolbar=yes,menubar=yes,resizable=yes");

Works fine - window opens 200x200 pixels.

Kim Crosser
  • 413
  • 8
  • 13