Announcement

Collapse
No announcement yet.

How do I force my pop-up boxes to stay on top (keep focus)?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How do I force my pop-up boxes to stay on top (keep focus)?

    If you open up 'actiniccore.js' within your 'Site1' (or equivalent) folder, you can modify the code for the ShowPopUp function.

    Scroll down to the bottom of this page to the function 'ShowPopUp'. You can then just replace that function with this code below. All it does is call focus to the page if it is hidden by another page.

    Version 7
    Code:
    function ShowPopUp(sUrl, nWidth, nHeight)
    {
    window.open(sUrl, 'ActPopup', 'width=' + nWidth + ',height=' + nHeight + ',scrollbars, resizable');
    ActPopup.focus();
    }

    Version8 / 9
    Code:
    function ShowPopUp(sUrl, nWidth, nHeight)
      	{  
    	window.open(sUrl, 'ActPopup', 'width=' + nWidth + ',height=' + nHeight + ',scrollbars, resizable').focus();
    	if (!bPageIsLoaded)
    		{
    		window.location.reload(true);
    		}
    	}
    Thanks to Norman Rouxel for the additional v8/v9 code
Working...
X