can i add my logic after I click Delete button?

3 replies. Last post: May 11, 2010 4:25 PM by Yudi
Tags :
  • (None)
Heny Member

hi,

can i add my logic after I click Delete button? for example:

system can judge if delete data base on my logic when i click Delete button.

Answers

Yudi Member

In order to cancel delete method in OnBeforeDelete client side event, you can add “return false;” line on the specific condition that you wish the deletion to be canceled.

The code snippet below shows that if the resource id of the selected event equals to “8”, then all delete operation over the events will be canceled on OnBeforeDelete client side event.

<script language="javascript" type="text/javascript">
    <!--
    function ws1_OnBeforeDelete(controlId, evt) {
        var ws1 = ISGetObject(controlId);

        if (evt.ResourceID == "8") {
            return false;
        }

        return true;
    }
    -->
</script>

Hope this helps. Please let us know if you have different scenario.

All Replies

Yudi Member

WebScheduler has OnDelete (server side event); and both OnBeforeDelete and OnAfterDelete (client side event) that will be invoked when user deletes event. You may add your own logic in those events if needed.

Please let me know your response.

Heny Member

hi,yudi!

I want to kown how to use OnBeforeDelete event and i want to kown how to cancel delete methord in OnBeforeDelete .

Yudi Member

In order to cancel delete method in OnBeforeDelete client side event, you can add “return false;” line on the specific condition that you wish the deletion to be canceled.

The code snippet below shows that if the resource id of the selected event equals to “8”, then all delete operation over the events will be canceled on OnBeforeDelete client side event.

<script language="javascript" type="text/javascript">
    <!--
    function ws1_OnBeforeDelete(controlId, evt) {
        var ws1 = ISGetObject(controlId);

        if (evt.ResourceID == "8") {
            return false;
        }

        return true;
    }
    -->
</script>

Hope this helps. Please let us know if you have different scenario.

All times are GMT -5. The time now is 5:41 AM.
Previous Next