2021年3月20日星期六

Changing window.open popup location on second monitor

I have a popup window set to open in a specific location on screen. On the primary monitor (monitor 1), the popup window will open in the location I list (slightly left and up from center screen), however when I try opening the popup on monitor 2 (to the left of the primary monitor) the window defaults to the upper right corner of monitor 2 and will not change opening location if I adjust the "top" and "left" parameters.

Here is the code:

    function callMotorInformation() {          var tempVehicleID = document.getElementById('<%=vehicleIDHF.ClientID%>').value;          var tempNumber = document.getElementById('<%=TextBox1.ClientID%>').value;          var url = "motordefault.aspx?WorkorderID=" + tempNumber + "&VehicleID=" + tempVehicleID;          var retval = window.open(url, "Labor Diagnostics", "location=0,menubar=0,status=0,scrollbars=0,titlebar=0,top=100,left=200,width=830,height=630");  
https://stackoverflow.com/questions/66727946/changing-window-open-popup-location-on-second-monitor March 21, 2021 at 09:04AM

没有评论:

发表评论