Popup editor  will not close properly...

Popup editor  will not close properly...



I have the following scenario:

Screen which contains Table record, clicking on a link on the TR will consequently open an Popup_Editor. At this point, the user is being given the chance to click another link, which will close the owner  an open another Pop_Editor. Til here everything goes fine and dandy. The problems starts when the user hits the 'Cancel' buttom. This, as might one suspects, will abort changes, close the popup and retain focus back to the main screen. However after the action executes, it retriggers the popup's preperation action, and then close the editor. weird, no?

I'm using OSS

Help will be greatly appericiated.



it's not weird, it's known.

the preparation is in a way the page_load of old skool .net.
use ajax as submit method instead of plain submit.
or if you cannot use ajax, use an if block with "isloadingscreen"

check out this page for more info.

Thanks Joost, It helped!


Using Ajax method to close the popup did work well. However, Now I have another issue. As menthioned above, the flow determines that upon closure of one Popup_ediitor screen popup will consequently  will be open. Those screens varies on size but since popup 2 is called from popup 1, it will render the content of the second within the boundries of the calling (first) popup.

The above action is triggered by a link with Popup 1 with a regular Submit.

Any Ideas how i can first close the popup and then open the second popup only with its original size?




suggestion 1:
after a popup-close place an end-action, because there will be an action executed in the mother-screen.
in that action you might provide a widget_click of an hidden button where you will popup the second screen.

suggestion 2:
perhaps it would be better to make it 1 popup, where based on criteria you will show a certain part of the screen.
so, when the user hits cancel you just do an ajax-refresh and switching the "divs"
to fix the different screensizes, you might be able to set the screensize in the mother-screen.