Page 1 of 1

Refresh data in iframe

Posted: Fri Oct 25, 2019 3:41 pm
by frank
I have a launch form where te user can select with some dropdown boxes the year and month of a period.
The year and month are concatenated to a string like "2019-10" and put in a hidden box on the form with id afs_jrmnd.
Inside the form is an iframe with a browse form with multiple records for each period of a month. The name of the hidden box is set as the filter (#afs_jrmnd#) for the iframe.
I would like to refresh the data in the iframe whenever the user changes the month or year of the period, so that only the data of the selected period is shown.
How can I invoke the refresh of the iframe from the JavaScript attached to an onchange event of the hidden text box?

Re: Refresh data in iframe

Posted: Fri Oct 25, 2019 3:50 pm
by kev1n
Hi,

Add an onchange event to your hidden box afs_jrmnd and call nuSearchAction(1); to to refresh the browse form.

Re: Refresh data in iframe

Posted: Fri Oct 25, 2019 4:14 pm
by frank
Thanks for your quick reply, but unfortunately it also seems to refresh the container launch form and the values in the dropdown boxes are cleared.

Re: Refresh data in iframe

Posted: Fri Oct 25, 2019 9:06 pm
by kev1n
Try this:

Code: Select all

$("#id_of_run_object")[0].contentWindow.nuGetBreadcrumb(0);
Replace id_of_run_object with the id of your run object.

Re: Refresh data in iframe

Posted: Sat Oct 26, 2019 9:32 am
by frank
Wow. It works. This is magic. :D
Thanks a lot.