Created
September 17, 2020 14:46
-
-
Save JacobLett/781058e9af559cfc9091bffd2ed1b5ed to your computer and use it in GitHub Desktop.
Grab URL parameters script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Apply URL parameters to Register Button if present | |
var changeTarget = document.getElementById('registerBtn'); | |
var params = window.location.search; | |
var _href = changeTarget.href; | |
// Does the page have url parameters ? | |
if (params) { | |
// yes - add them to the iframe src | |
changeTarget.href = _href+params; | |
console.log("url params = " + params); | |
} else { | |
// no - use a generic iframe src | |
changeTarget.href = _href; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a href="/en/event-registration" data-type="btn" class="img-container" style="position: relative;" id="registerBtn"><button class="btn white-btn">Register Now</button></a> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment