Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Loading Javascript Libraries


Custom Links and Buttons

If you have any custom html with <a> or <button> or <input> with button html tag, the AJAX Based DX 8 Themes would bind click event to intercept them, this is part of Single Page Application (SPA) treatment.

Code Block
languagexml
titleCustom HTML Code
linenumberstrue
<a href="inbox">See My Inbox</a>

<button>Do Something</button>
<input id="resend" name="resend" class="form-button btn button" type="button" value="Send Me OTP">

If you do not want this behavior, you will need to unbind the click event. For example, please consider the code below.

Code Block
languagexml
linenumberstrue
<script type="text/javascript">
$(document).ready(function() {
    $("#resend").off("click");
    $("#resend").on("click", function(event) {
      console.log('enter resend');
      FormUtil.getField("status").val("resendOTP");   
$("#assignmentComplete").focus().click();
        return false;
    });
     $("#changeTo").off("click");
     $("#changeTo").on("click", function(event) {
      console.log('enter changeConfirm');
      FormUtil.getField("status").val("changeConfirm");
$("#assignmentComplete").focus().click();
return false;
     });
});
</script>