Renaming node from jsTree inside a mvc2 form.
Posted
by Stef
on Stack Overflow
See other posts from Stack Overflow
or by Stef
Published on 2010-06-02T07:14:24Z
Indexed on
2010/06/02
11:23 UTC
Read the original article
Hit count: 501
asp.net-mvc-2
|jstree
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 ?
© Stack Overflow or respective owner