• Resolved globeorange

    (@globeorange)


    We need to run a for loop in the script that runs after the form load. and when we user for (i =0; i< 5; i++), the < symbol gets html encoded when it goes in the source code and hence doenst run, gives error SyntaxError: missing ) after for-loop control.. is there a way to allow for-loop to run in the script code section?

    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Yuval

    (@yuvalsabar)

    Hi @globeorange,

    Please attach of full screenshot of your Redirect Settings tab.
    Along with the screenshot, please write down you whole script.

    Yuval.

    Thread Starter globeorange

    (@globeorange)

    Thanks for the quick reply,

    here is the screenshot:
    https://www.awesomescreenshot.com/showImage?img_id=3459361

    here is the script (URL in script has been changed for privacy):

    var referrer_code = “”;
    var nameEQ = “vsu_referer_hash=”;
    console.log(nameEQ);
    var ca = document.cookie.split(“;”);
    console.log(ca);
    var i;
    var text = “”;
    for (i = 0; i < ca.length; i++) {
    text += ca[i] + “”;
    }

    var user_email = document.getElementsByName(“your-email”)[0].value;
    user_email = encodeURIComponent(user_email);
    var user_name = document.getElementsByName(“your-name”)[0].value;
    user_name = encodeURIComponent(user_name);

    var api_url = “https://api.domain.com/v1.0/W4qLb4115082.js/newSignup?email=&#8221; + user_email + “&name=” + user_name + “&referrer_code=” + referrer_code + “&campaign_id=9214”;

    console.log(api_url);
    var xhr = new XMLHttpRequest();
    xhr.open(“GET”, api_url, false);
    xhr.send();
    json_result = xhr.responseText;

    if(xhr.status == 200){
    console.log(json_result);

    }
    else {
    console.log(xhr.status);
    console.log(xhr.statusText);
    console.log(xhr.responseText);

    }

    Plugin Contributor Yuval

    (@yuvalsabar)

    I cannot see any screenshot. Please upload it to a different source.

    Thread Starter globeorange

    (@globeorange)

    here you go: https://irefer.io/cf7.png

    thanks

    Plugin Contributor Yuval

    (@yuvalsabar)

    Hi,

    I see the problem. We’ll fix that in the next update, 2-3 weeks from now.
    Sorry for the inconvenience.

    Yuval.

    Plugin Contributor Yuval

    (@yuvalsabar)

    Hi @globeorange,

    This issue has been resolved in v1.2.7.

    Yuval

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘SyntaxError: missing ) after for-loop control’ is closed to new replies.