Good evening.
I don't know much about programming, nor programming language, so bear with me.
I am attempting to create a page with a link that contains a pre-made url, but adds dynamic information from the url of the current page.
Thus, when they land on such a page, there will be an href link ("www.pre-determined-url.com/"), and from the page's current url will be obtained appropriate information (in which there is a code "?code=dynamic_information").
I have been using dynamic information from gravity forms and javascript (which might not work together), and below is the code I have been using in html:
<a href="" id="sp_link" dir="rtl" style="display: inline-block; text-decoration: none;" target="_blank" rel="noopener">
Link to other page with content gained from url</a>
<script>
window.onload = function() {
sp_link.href ='www.pre-determined-url.com/' + [?code=dynamic_information];
}
</script>
The current url would be something like "www.current-page.com/?code=information", and the "?code" information would go into the javascript's href.
I thank you in advance for any help and patience.