Skip to content

Commit

Permalink
updated onclick() parameter passing in javascript
Browse files Browse the repository at this point in the history
on click event parameter passing formatted from 
` onClick ="deleteNote({{note.id}})" `
to
`onClick ="deleteNote('{{note.id}}')"`
now there's no "property assignment error"
  • Loading branch information
AusafMo authored Mar 7, 2023
1 parent ed8c8b0 commit 4caddea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion website/templates/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ <h1 align="center">Notes</h1>
{% for note in user.notes %}
<li class="list-group-item">
{{ note.data }}
<button type="button" class="close" onClick="deleteNote({{ note.id }})">
<button type="button" class="close" onClick ="deleteNote('{{note.id}}')">
<span aria-hidden="true">&times;</span>
</button>
</li>
Expand Down

0 comments on commit 4caddea

Please sign in to comment.