Php pop up window updating parent

Once the pop-up window has the reference, we can store it in a form field (if the page has a form with refresh-potential) so that we never lose the reference.

The beauty behind this is that we are coding to an interface.

Also we added some css references into the head block in order to apply predefined Magento admin theme styles on out Popup dialog.

Hi: When doing a php "INCLUDE" for (versus loading via “IFRAME”), popups don't display, or display in a location well away from mouse event when is positioned within parent objects (if is positioned within another DIV, or as a right column DIV for example). The reason for this is that the “popup.php” script sets the TOP= and LEFT= values for the popup relative to the top, left corner of the window, instead of relative to the popup’s parent objects, which is what the browser expects.

I am not saying this is by any means a "best" practice, but this is how I do it.

There are, of course, two pages: the pop-up and the primary.

The PHP Form has an input box where the user types in a product code.

I’ve enclosed a version of that corrects this problem.

I also addressed a number of other issues with the popups, including popups toggling back and forth within iframes, large popups disappearing to the left of the iframe, popup problems around the edge of pages, etc .

The pop-up window doesn't need to know how the data is being handled; it only needs to know that the data can be taken by some method.

The parent (opener) doesn't need to know anything about the pop-up, it only needs to know that its call back method might be invoked.

Leave a Reply