Click here to Skip to main content
15,889,116 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to create a Name popup function, where the user will click the name textbox and popover will ask for more validation.

This is the code:

XML
<form class='form'>
  <div class='controls'>
    <% var compiled =  _.reduce(items, function(str, v, k){
       v["name"] = k;
      return str + popoverTemplates[v["type"]]*(v);
     }, ""); %>
    <%= compiled %>
    <hr/>
    <button id="save" class='btn btn-info'>Save</button><button id="cancel" class='btn btn-danger'>Cancel</button>
  </div>
</form>



The errors come from this line: }, "")
Error on comma says: Syntax error on token "," invalid (
Error on bracket says: Syntax error, insert AssignmentOperator Expression to complete expression
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900