i guess to be clear:
i need to assign the URL to the button dynamically.
depending on a parameter inside the URL (which i am able to successfully pull).
now all i have left to do is to assign the dynamically created URL to the button, so that when it is being clicked, the user is being taken to that URL.
looking and looking and trying to pull my hair out - all did not help.
ok. figured it out.
not a javascript pro.
document.getElementById(‘lp-pom-button-16’).href = theURL2;
*removed the hashtag in front of the element id
& instead of calling a function on click, i had to just refer to the href
& i packed it all into a “window.onload” function in order to be sure that the element had been loaded by the time i am trying to adjust its href property.