Last active
March 27, 2020 08:19
-
-
Save agupta93/6010708f4b6d3d76103351d7c78b094b to your computer and use it in GitHub Desktop.
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
| <script type="text/javascript"><!--{literal}> | |
| function getVisitor() { | |
| console.log('getVisitorCalled'); | |
| var visitorInput = document.getElementById('ID_form79fea66b_guest_register_receipt_visitor'); | |
| var visitor = visitorInput && visitorInput.value; | |
| return visitor; | |
| } | |
| function redirectToVisitorPage() { | |
| console.log('redirect called.'); | |
| var VISITOR_TO_REDIRECT_URL = { | |
| 1: "https://google.com", | |
| } | |
| var selectedVisitor = getVisitor(); | |
| var redirectUrl = VISITOR_TO_REDIRECT_URL[selectedVisitor]; | |
| if (redirectUrl) { | |
| window.location.href = redirectUrl; | |
| } | |
| } | |
| redirectToVisitorPage() | |
| // --> | |
| {/literal}</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment