I’m trying to implement a jeditable textfield in the CP of my module (mcp.module.php).
Here’s the code from the view:
$(document).ready(function() {
$('.editable').editable('http://ee2pb.dev/system/index.php?S=ab72a19d08e6af47dc78cecb14f8c2af23c6c766&D=cp&C=addons_modules&M=show_module_cp&module=mymodule&method=save_method',
{
indicator : 'Saving...',
tooltip : 'Click to edit...',
cancel : 'Cancel',
submit : 'OK',
callback : function(value, settings) {
/*console.log〈this〉;
console.log〈value〉;
console.log〈settings〉;
*/
alert(value);
}If I just do a /save.php in the above code, it will work (contact /save.php on my webserver).
However, the above code will fist call the module, EE will respond with headers “302 Moved Temporarily”), and AJAX will end up calling the main page of the CP.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.