title: Need Help Debugging Unexpected EOF Javascript error
body: <p>I'm running Woocommerce on Wordpress. I get <code>SyntaxError: Unexpected EOF</code> in Safari
  when trying to reveal new fields when I click on a "Add new Field" button. And in Firebug I get this error:</p>
  
  <pre><code>SyntaxError: unterminated string literal
  
  
  var newRow = '\
  </code></pre>
  
  <p>This is the script that this error is associated with, and I don't know how to fix it.</p>
  
  <pre><code>&lt;script&gt;
  
                              jQuery(document).ready(function(){
  
                                   var newRow = '\
  
                                       &lt;tr&gt;\
  
                                          &lt;td align="center"&gt;\
  
                                              &lt;select name="wc_custom_checkout_newfield[enabled][]"&gt;\
  
  
                                                      &lt;option value="1"&gt;Yes&lt;/option&gt;\
  
  
                                                      &lt;option value="0"&gt;No&lt;/option&gt;\
  
  
                                              &lt;/select&gt;\
  
                                          &lt;/td&gt;\
  
                                          &lt;td&gt;\
  
                                              &lt;select name="wc_custom_checkout_newfield[section][]"&gt;\
  
  
                                                      &lt;option value="billing"&gt;Billing&lt;/option&gt;\
  
  
                                                      &lt;option value="shipping"&gt;Shipping&lt;/option&gt;\
  
  
                                                      &lt;option value="account"&gt;Account&lt;/option&gt;\
  
  
                                                      &lt;option value="order"&gt;Order&lt;/option&gt;\
  
  
                                              &lt;/select&gt;\
  
                                          &lt;/td&gt;\
  
                                          &lt;td&gt;\
  
                                              &lt;select name="wc_custom_checkout_newfield[type][]"&gt;\
  
  
                                                      &lt;option value="text"&gt;Text&lt;/option&gt;\
  
  
                                                      &lt;option value="textarea"&gt;Textarea&lt;/option&gt;\
  
  
                                                      &lt;option value="password"&gt;Password&lt;/option&gt;\
  
  
                                                      &lt;option value="date"&gt;Date&lt;/option&gt;\
  
  
                                                      &lt;option value="country"&gt;Country&lt;/option&gt;\
  
  
                                                      &lt;option value="state"&gt;State&lt;/option&gt;\
  
  
                                                      &lt;option value="select"&gt;Select&lt;/option&gt;\
  
  
                                                      &lt;option value="checkbox"&gt;Checkbox&lt;/option&gt;\
  
  
                                              &lt;/select&gt;\
  
                                          &lt;/td&gt;\
  
                                          &lt;td&gt;&lt;input name="wc_custom_checkout_newfield[label][]" type="text" value="New Field Label" /&gt;&lt;/td&gt;\
  
                                          &lt;td&gt;\
  
                                              &lt;input name="wc_custom_checkout_newfield[field_name][]" type="hidden" value="newfield" /&gt;\
  
                                              &lt;input name="wc_custom_checkout_newfield[field_name][]" type="text" value="newfield" disabled="disabled" /&gt;\
  
                                          &lt;/td&gt;\
  
                                          &lt;td&gt;&lt;input name="wc_custom_checkout_newfield[placeholder][]" type="text" value="New Field" /&gt;&lt;/td&gt;\
  
                                          &lt;td&gt;&lt;input name="wc_custom_checkout_newfield[class][]" type="text" value="form-row-wide" size="12" /&gt;&lt;/td&gt;\
  
                                          &lt;td&gt;&lt;input name="wc_custom_checkout_newfield[options][]" type="text" value="" size="12" /&gt;&lt;/td&gt;\
  
                                          &lt;td&gt;&lt;input name="wc_custom_checkout_newfield[order][]" type="text" value="" size="6" /&gt;&lt;/td&gt;\
  
                                          &lt;td align="center"&gt;\
  
                                              &lt;select name="wc_custom_checkout_newfield[required][]"&gt;\
  
  
                                                      &lt;option value="1"&gt;Yes&lt;/option&gt;\
  
  
                                                      &lt;option value="0"&gt;No&lt;/option&gt;\
  
  
                                              &lt;/select&gt;\
  
                                          &lt;/td&gt;\
  
                                          &lt;td align="center"&gt;\
  
                                              &lt;input name="wc_custom_checkout_newfield[default][]" type="hidden" value="0" /&gt;\
  
                                              &lt;input id="removeRow" type="button" value="X" title="remove this row"&gt;\
  
                                          &lt;/td&gt;\
  
                                      &lt;/tr&gt;';
  
  
  
                                   jQuery('#addRow').click(function(){
  
                                    jQuery('#block').append(newRow);
  
                                    reIndex();
  
                                   })
  
  
  
                                   jQuery('#removeRow').live('click', function(){
  
                                    jQuery(this).closest('tr').remove();
  
                                    reIndex();
  
                                   })
  
  
  
                                   function reIndex(){
  
                                     jQuery('#block').find('.index').each(function(i){
  
                                     jQuery(this).html(i+2);
  
                                    })
  
                                   }
  
  
  
                                  })
  
                                  &lt;/script&gt;
  </code></pre>
  
  <p>I tried disabling plugins, and removing all other javascript to see if there is a conflict, but nothing seems to work. Any ideas?</p>