I have a custom ribbon button which should start a workflow on a specific element in my library. I want to add a javascript/jquery check to verify some data and only if everything is fine, the button event should fire up.

Button example:

<a unselectable="on" href="javascript:;" onclick="return false;" class="ms-cui-ctl-large " mscui:controltype="Button" role="button" id="AddNewButton-Large"><span unselectable="on" class="ms-cui-ctl-largeIconContainer"><span unselectable="on" class=" ms-cui-img-32by32 ms-cui-img-cont-float"><img unselectable="on" alt="Neue Testmappe erstellen" src="http://contoso:43265/sites/contoso/_layouts/Images/docset_captureversion_32.png" style="left: 0px;"></span></span><span unselectable="on" class="ms-cui-ctl-largelabel">Create Element<br>erstellen</span></a>

Tried everything, but the event is always firing. Also tried .unbind oder .off methods. Really dont know how to prevent the event from being fired.

  • What method did you use to add the ribbon button? SharePoint Designer? – Submits Mar 16 '17 at 14:13
  • I do not know. The code is not mine. – Florian Leitgeb Mar 17 '17 at 10:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.