Reputation: 2295
This question might be very simple to many of you, but I am just learning. Trying to convert form to Html.BeginForm
The old script is
<form method="POST" name="myquiz">
Trying to convert it to
<% Html.BeginForm(new {name="myquiz"}); %>
<input type="button" value="Grade Me!" name="B1" onclick="gradeit()" class="t-button"/>
<input type="button" value="Reset" name="B2" onclick="document.myquiz.reset()" class="t-button"/>
<% Html.EndForm(); %>
When I click on reset button, I get the following error:
Unable to get property 'reset' of undefined or null reference
Would appreciate your suggestions.
Upvotes: 0
Views: 369