Renaming node from jsTree inside a mvc2 form.
- by Stef
I've the following code:
<% using (Html.BeginForm("Update", "SkillLevel", FormMethod.Post, new { id = "TheForm" }))
{ %>
<div id="demo3" class="demo">
<ul>
<li id="shtml_1">
<a href="#">Root node 1</a>
<ul>
<li id="shtml_2">
<a href="#">Child node 1</a>
</li>
<li id="shtml_3">
<a href="#">Child node 2</a>
</li>
</ul>
</li>
<li id="shtml_4">
<a href="#">Root node 2</a>
</li>
</ul>
</div>
The problem is that when I rename a node, i press Enter to complete the rename. But when pressing Enter, the form gets submitted and the new value is never changed in the tree.
How to sole this ?