I am having an issue when using jeditable to edit a cell in a table.
The project is the MVC 2 web application and the table has been put on the standard about page. How do i tell the script to call a specific method in the controller ? because it is currently just loading the entire page into the cell.
This is the javascript:
$(document).ready(function () { $('.editable').editable('http://localhost:2196/Home/About', { type: 'text', cancel: 'Cancel', event: 'dblclick', submit: 'OK', tooltip: 'double Click to edit...' }); });This is the table :
<% foreach (DataTableEditable.Models.Company item in (IEnumerable<DataTableEditable.Models.Company>)Model)
{%>
<tr id="<%= Html.Encode(item.ID) %>">
<td class="editable"><%= Html.Encode(item.Name) %> </td>
<td><%= Html.Encode(item.Address) %> </td>
<td><%= Html.Encode(item.Town) %> </td>
</tr>
<% }%>
Thanks lots John
Thanks but I have now solved it.
I needed to add
[AcceptVerbs("POST")]
public ActionResult UpdateSettings(string id, string value)
{
return Content(value);
}
to the controller.