The new page you are trying to use seems to have the same cross-origin issues.
However, you can open your popup and size it to an object on the page.In fact, I'm going to modify
pgGotoURL() (PowerPac v15 beta) to allow this ability.
Here is some sample code you can play around with:
var loadWin = function(url, alignToName, refresh) {
var bds = { align : '', page : '', screen : '', titlebar : ''}, adj = 2, pos;
if (alignToName) {
bds.align = tbfunction_pgTBObjGet(alignToName, 'bounds').split(',');
}
bds.page = tbfunction_pgTBObjGet('page', 'bounds').split(',');
bds.screen = [window.screenX, window.screenY, window.outerHeight, window.innerHeight];
bds.titlebar = bds.screen[2] - bds.screen[3];
pos = [ bds.align[0]*1 + bds.page[0]*1 + bds.screen[0]-adj,
bds.align[1]*1 + bds.page[1]*1 + bds.screen[1] + bds.titlebar-adj*2,
bds.align[2], bds.align[3] - Math.round(bds.titlebar/2.65)*2 ];
/* Next line gives trouble in Chrome if "RefWindow" does not exist.
Only set refresh to true for 2nd execution.
This will be addressed in PowerPac v15 beta.
***/
if (refresh) window.open('', 'RefWindow').close();
tbfunction_pgGotoURL("RefWindow", url, pos[0], pos[1], pos[2], pos[3], "",
"scrollbars=1", true, true);
return pos; //returns position array for debugging
};
return loadWin('https://www.google.com', 'exec', false); //Chg 'exec' to name of target obj
To run the code you can try it in one of the following ways:
- Developer code page:
https://pgsoftwaretools.com/powerpac/assessments/exec-js/ - Paste the code into a field named "code" and run it with exeJavascriptDirect().
Of course you must change the line "return loadWin( . . . );" to reference a named object other than "exec". - Create the function in an XML file and execute it from there. (Recommended for ease of use and modification.)
Once
pgGotoURL() is updated with similar code/features, you will need to download and use the latest PowerPac v15 beta to benefit from it.
To keep your window on top, just call this function from a timer with a fairly loose interval of like 1500ms.
I've experimented with this and it worked pretty good and I think this may be what you are looking for. At least this is something others may find useful as well.