Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Refresh the content of an iframe Topic is solved

Questions related to customising nuBuilder Forte with JavaScript or PHP.
Post Reply
yvesf
Posts: 305
Joined: Sun Mar 14, 2021 8:48 am
Location: Geneva
Has thanked: 83 times
Been thanked: 11 times

Refresh the content of an iframe

Unread post by yvesf »

Hi,

I am stuck to refresh an iframe on change.
Here is a video presenting what I would like to do
refresh_iframe.gif
To do so I have tried those 3 options without any effect. What is wrong ?
All options are implemented on the Custom Code tab "On change" of the cs_patient_id labelled Patient in the video
Option 1: with nuGetBreadcrumb

Code: Select all

const contentWindow = $("#cs_patient_histo_CR")[0].contentWindow;
contentWindow.nuGetBreadcrumb();
Option 2 : with nuFilterRun thinking it could run the sql request behind the iframe where I do the filtering. I don't use any filter on the iframe, doing that at the SQL Request level with a where clause

Code: Select all

nuFilterRun('cs_patient_histo_CR');
Option 3 : with nuRefreshSelectObject

Code: Select all

nuRefreshSelectObject('cs_patient_histo_CR');
Any of those options is working unfortunately.
Many thx for your help,

Yves
You do not have the required permissions to view the files attached to this post.
kev1n
nuBuilder Team
Posts: 4242
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 68 times
Been thanked: 422 times
Contact:

Re: Refresh the content of an iframe

Unread post by kev1n »

Call the code in the After Browse event of the lookup object.
yvesf
Posts: 305
Joined: Sun Mar 14, 2021 8:48 am
Location: Geneva
Has thanked: 83 times
Been thanked: 11 times

Re: Refresh the content of an iframe

Unread post by yvesf »

Both nuFilterRun and nuGetBreaddcrumb are working. Very helpfull

Yves
Post Reply