append to footer text

in 2020 had
$(“.ew-footer-text”).append(‘<?php echo Config("PRODUCT_REL_VERSION") ?>’);

that text was in the footer.php file, now in 2021 its in the userevent.js file and doesn’t append the text.

i don’t see any errors and also tried to wrap it with loadjs.ready(“jquery”, function() {}

loadjs.ready(“jquery”, …) is fired after “jquery” is loaded, it is too early for the footer. You may put the line in global Startup Script.

hi,

that’s where it was

looks like the php code doesn’t get executed

straight variable works
$(“.ew-footer-text”).append(’ test ');

with php code does not
$(“.ew-footer-text”).append(‘<?php echo Config("PRODUCT_REL_VERSION") ?>’);

trying to find the js equivalent… is there a JS equivalent to get a Config value

You’d better use “SetClientVar” global function to pass server side data to client side as a property of the ew.vars object.

For more info and example, please read “Some Global Functions” under the “Server Events and Client Scripts” topic from PHPMaker Help menu.