Last active
November 23, 2015 18:34
-
-
Save PardotGists/c36faa5eaea2c015630b to your computer and use it in GitHub Desktop.
Preventing Competitors from Accessing Content on Form Submission thank you code
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"> | |
var email = "%%email{js}%%"; //set the field name to a local javascript variable | |
if (email.indexOf("@competitor1.com")!=-1){ //if the string has the competitor name | |
top.location="http://loc1"; //redirect to a location | |
} else if (email.indexOf("@competitor2.com")!=-1){ | |
top.location="http://loc2"; | |
} else { //go to the real location | |
top.location="http://nonCompetitorLocation"; | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment