This topic is locked

BeforeShowEdit Add runtime html

6/16/2023 6:59:59 AM
PHPRunner General questions
A
aalekizoglou author

Is there a way I can add custom html during runtime on BeforeShowEdit using the $xt or $pageObject?
What I wish to accomplish is a function call for each page on my project, to gather appropriate html based on tablename and pageType. Then inject it in the $pageObject after specific holder (e.g. backbutton) without having to put that code snippet on every page.
I can do this with JS OnLoad event but there is a lag displaying my custom html since my JS code will run after the page has been loaded.Using the $pageObject inject method the page will be rendered before sending it to the browser.

Sergey Kornilov admin 6/16/2023

You can do that but you stil need to define a placeholder for that HTML first.

A
aalekizoglou author 6/19/2023

Great,
placing placeholder for HTML is what I am doing so far, and to tell the trouth would try to avoid since I need this for every page /table of my project ;)
No problem anyway