AnsweredAssumed Answered

Redirect from Form Custom HTML

Question asked by Danny Tran on Jul 12, 2018
Latest reply on Aug 1, 2018 by Sanford Whiteman

Hi there,


I'm trying to redirect known persons to a blanket "success page" that would trigger an email delivery based off of a querystring parameter. The issue I'm having is that the script I am using for the redirect won't fire and redirect the person.


Here's the script:

// <![CDATA[
function getParameterByName(name) {
    url = window.location.href;
    name = name.replace(/[\[\]]/g, '\\$&');
    var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
        results = regex.exec(url);
    if (!results) return null;
    if (!results[2]) return '';
   return decodeURIComponent(results[2].replace(/\+/g, ' '));
//get the desired content value
var content = getParameterByName('content');
//redirect the user to the success page with desired content
// ]]>

Here's the test page:


Does anyone know what the issue is here?


Edit (07/12/2018 11:29am PST): Utilize Advanced Syntax Highlighter for script


Thanks in advanced!


Danny T.