Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Disable Page validation for a specific button in a form

Hi All,

I have a simple form with two input fields, "Submit" button and "Cancel" button.

The two input fields have SAP validators attached to them.

I want to disable the validators when the user clicks the "Cancel" button.

In ASP I can write:

<script language="JavaScript>

document.all["cmdCancel"].onclick =

new function("Page_ValidationActive=false;");


(When "cmdCancel" is the ID of the button)

I tried to write the following code in my Portal Component:

cmdCancel.ScriptingEvents("BUTTONCLICK") = "Page_ValidationActive=false;"

I get no JavaScript errors but the validators on the page are still active.

How can I disable the validators when clicking this specific button?



PDK version 2 ; EP6 SP15

Not what you were looking for? View more on this topic or Ask a question