Open new window in parent from popup calendar

Hi There,

i have a calendar that i call from a menu. when you click on an item you get a popup with info form of the appointment. so far so good. in the form i have a button to an external from (or grid) and i like to open that in the parent (were the calendar is). the problem is that if you have a button in the popup you can only choose - new windows or this window (were this window is the popup and not the parent)

i wan’t to close the popup and then open the form or grid from the button.

it is not acceptable that a user gets a new window because it’s confusing for the client to have two browser windows open. and the popup is far to smal for the additional information.

any suggestions?

You should have more control if you create a PHP button and do a sc_redir

Hi @jlboutin60 that’s true but the problem is to close the pop-up and open a new window don’t work. i tried everything from php tot java.

sc_redir(Z_ILP_doc_bewerk_les, wk_id = [wk_id]; _self);

for example gives this message or i get an ok when i make it a fuction


You don’t need to do a window.close() when you do an sc_redir

If you only get a small OK button without any other text add sc_exit(sel) on the last line

yes i thought so either. but _self, _blank, _top results in opening the new form in the same popup.

If the frame is too small you can resize it

//Resize parent iFrame (onScriptInit event)
     $('#TB_iframeContent',window.parent.document).height('xxx px');
     $('#TB_iframeContent',window.parent.document).width('xxx px');

or the top iframe

     $('#id-iframe-1',window.parent.parent.document).height('xxx px');
     $('#id-iframe-1',window.parent.parent.document).width('xxx px');

Check the name of your iframe id, they may be different

mhmmm. a simple close of a popup… frame resizing is not the answer i’m looking for. but thanks for the solution.

i still don’t know how to do this. if you have a suggestion to close the popup and open a new form in the parent. it should be simple, but nothing seems to work

When you click on an event the calendar open the iframe TB_iframe, then it open the calendar form id-iframe-1 to show you the detail of the event

if you close this iframe you will be back to the calendar (with sc_exit())

I have a similar situation where I add a button that is link to the customer account in this calendar form. You have the choice to either open the form or grid you want in the form (that’s why I use frame resizing) or open it in a new windows