[Solved] Subpage - Javascript after Adding/Saving Data

Hey there,

the situations looks like the following:
I have a sub-page with an table to show data and an edit form also inside of a sub-page. I have some javascript code on the both sub-pages. the codes work perfect when each page is called for the first time. But does not when i add data trough the form then after clicking the saving button it calls the page with the table. And now the javascipt code does not work anymore in the sub-page of the table and also not when i click the “add” button again to show the form-sub-page. Only after page refresh it works again correct.

Could this behavior caused by the sub-pages in combination with the submitting form?
Would be thankful for a hint to a solution. :slight_smile:

Hi @sunday,

Yes, i think the Script works on the page load, but in case of Subpage, the script will not know what the element is as it may be loading after the script has loaded, hence the issue.


I understand what you mean.

But, I do not entered that javascript in the advanced section of that Page. I entered it in the specific section of the SUBpage. I my thought this should be loaded every time the subpage is shown, or may I am wrong?

Hi @sunday, We haven’t checked this scenario yet. I am not sure if the Subpage JS will get executed as you mentioned.


Thanks for your answer! Then I will use normsl pages instead of subpage.

1 Like