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?
Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
Refresh data in iframe
-
- nuBuilder Team
- Posts: 4307
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 448 times
- Contact:
Re: Refresh data in iframe
Hi,
Add an onchange event to your hidden box afs_jrmnd and call nuSearchAction(1); to to refresh the browse form.
Add an onchange event to your hidden box afs_jrmnd and call nuSearchAction(1); to to refresh the browse form.
Last edited by kev1n on Sat Oct 26, 2019 9:52 am, edited 1 time in total.
-
- Posts: 3
- Joined: Sat Oct 19, 2019 5:01 pm
Re: Refresh data in iframe
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.
-
- nuBuilder Team
- Posts: 4307
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 448 times
- Contact:
Re: Refresh data in iframe
Try this:
Replace id_of_run_object with the id of your run object.
Code: Select all
$("#id_of_run_object")[0].contentWindow.nuGetBreadcrumb(0);
-
- Posts: 3
- Joined: Sat Oct 19, 2019 5:01 pm