Page 1 of 1

Leaving an iFrame

Posted: Tue Feb 01, 2022 1:17 pm
by marcus
Hi, i have an iFrame with a browse Window in it. When clicking an entry id like the Edit Window to be opened in the main screen instead the iFrame, is there a possibilty to achieve this?

Best regards!
marcus

Re: Leaving an iFrame

Posted: Tue Feb 01, 2022 1:34 pm
by kev1n
If you add this JS function to the iframe's Custom Code, the record should be opened in the main form .

Code: Select all

function nuSelectBrowse(e){
    
    var r   = $('#' + e.target.id).attr('data-nu-primary-key');
    parent.nuForm(nuGetProperty('form_id'), r, '', '', '1');

}

Re: Leaving an iFrame

Posted: Tue Feb 01, 2022 2:32 pm
by marcus
Thanks a lot! It works very well.

Re: Leaving an iFrame

Posted: Wed Apr 06, 2022 9:25 pm
by saultpastor
I am using this code with a browse (only) form in an iframe, but it redirects to a different edit form. The code opens an edit form (with no objects) in the main form, not the redirected edit form. If I remove the code it opens the redirected edit form but in the iframe (of course).

Thanks
Craig

Re: Leaving an iFrame

Posted: Thu Apr 07, 2022 6:14 am
by kev1n
Open the "Redirect To" form instead

Code: Select all

function nuSelectBrowse(e){
    
    var r   = $('#' + e.target.id).attr('data-nu-primary-key');
    parent.nuForm(nuGetProperty('redirect_form_id'), r, '', '', '1');

}