Title: SyntaxError: missing ) after for-loop control
Last modified: June 29, 2018

---

# SyntaxError: missing ) after for-loop control

 *  Resolved [globeorange](https://wordpress.org/support/users/globeorange/)
 * (@globeorange)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/syntaxerror-missing-after-for-loop-control/)
 * 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](https://wordpress.org/support/users/yuvalsabar/)
 * (@yuvalsabar)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/syntaxerror-missing-after-for-loop-control/#post-10447520)
 * Hi [@globeorange](https://wordpress.org/support/users/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](https://wordpress.org/support/users/globeorange/)
 * (@globeorange)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/syntaxerror-missing-after-for-loop-control/#post-10447823)
 * Thanks for the quick reply,
 * here is the screenshot:
    [https://www.awesomescreenshot.com/showImage?img_id=3459361](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 = “[http://api.domain.com/v1.0/W4qLb4115082.js/newSignup?email=&#8221](http://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](https://wordpress.org/support/users/yuvalsabar/)
 * (@yuvalsabar)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/syntaxerror-missing-after-for-loop-control/#post-10447907)
 * I cannot see any screenshot. Please upload it to a different source.
 *  Thread Starter [globeorange](https://wordpress.org/support/users/globeorange/)
 * (@globeorange)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/syntaxerror-missing-after-for-loop-control/#post-10448141)
 * here you go: [https://irefer.io/cf7.png](https://irefer.io/cf7.png)
 * thanks
 *  Plugin Contributor [Yuval](https://wordpress.org/support/users/yuvalsabar/)
 * (@yuvalsabar)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/syntaxerror-missing-after-for-loop-control/#post-10455058)
 * 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](https://wordpress.org/support/users/yuvalsabar/)
 * (@yuvalsabar)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/syntaxerror-missing-after-for-loop-control/#post-10515282)
 * Hi [@globeorange](https://wordpress.org/support/users/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.

 * ![](https://ps.w.org/wpcf7-redirect/assets/icon-256x256.gif?rev=3416723)
 * [Redirection for Contact Form 7](https://wordpress.org/plugins/wpcf7-redirect/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wpcf7-redirect/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wpcf7-redirect/)
 * [Active Topics](https://wordpress.org/support/plugin/wpcf7-redirect/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wpcf7-redirect/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wpcf7-redirect/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [Yuval](https://wordpress.org/support/users/yuvalsabar/)
 * Last activity: [7 years, 10 months ago](https://wordpress.org/support/topic/syntaxerror-missing-after-for-loop-control/#post-10515282)
 * Status: resolved