Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Daniel Bardi 927 posts 2562 karma points
    Feb 06, 2011 @ 04:50
    Daniel Bardi
    0

    Delete content node with javascript

    I need to be able to delete a node using javascript (same as used in the tree right-click menu).

    I've tried UmbMgr.appActions().actionDelete() but I need to be able to send in a nodeId.

    Any takers?

  • Daniel Bardi 927 posts 2562 karma points
    Feb 06, 2011 @ 06:43
    Daniel Bardi
    0

    I tried calling umbraco.presentation.webservices.legacyAjaxCalls.Delete() without success.

  • Daniel Bardi 927 posts 2562 karma points
    Feb 06, 2011 @ 10:26
    Daniel Bardi
    1

    Got it working with jquery.ajax... this is what I did:

        // Call web method to delete node
        $.ajax({
            type: "POST",
            url: "webservices/legacyAjaxCalls.asmx/Delete",
            data: "{'nodeId': '" + nodeId + "', 'alias': '', 'nodeType': '" + nodeType + "'}",
            contentType: "application/json; charset=utf-8",
            dataType: "json",
            async: true
        });

     

Please Sign in or register to post replies

Write your reply to:

Draft