PDA

View Full Version : Extended Info Popup (top)


BPJSURF
03-Apr-2003, 05:27 PM
I have a site that is using the exteneded info link for every product. www.thewarstore.com. One problem we are having is the exteneded info pop up box is not set to stay on "Top". I am sure there is a way to include a function in the Java script to keep the exteneded info box on top.

The problem arrises if you do not close the popup box before selecting the next More Info link on the section list page the pop up box unds up behind the main browser window.

Can anyone give me a clue as to what I would have to modify to make the popup box stay on top.

thanks

Brian

cdicken
04-Apr-2003, 03:40 PM
It must be something to do with the onFocus() and onBlur() commands. Is there a way to run an onFocus() command for a window when it finds itself blurred?

garyhay
04-Apr-2003, 04:56 PM
You need to put code into the BODY tag of the calling page telling the popup to regain focus.

Try the javascript.com user group.

BPJSURF
06-Apr-2003, 03:08 PM
Below is the simple answer to keeping your extended information pop up boxes on top.

If you open up actiniccore.js you can modify the code for the popup 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.


function ShowPopUp(sUrl, nWidth, nHeight)

{

window.open(sUrl, 'ActPopup', 'width=' + nWidth + ',height=' + nHeight + ',scrollbars, resizable');

ActPopup.focus();

}


Hope this helps others.

Brian