on 02-02-2006 6:14 AM
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;");
</script>
(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?
Thanks,
Omri
PDK version 2 ; EP6 SP15
More info:
I tried to call a java script function in the "scripting events" (instead of putting java script code):
cmdCancel.ScriptingEvents("BUTTONCLICK") = "disableValidation()"
and in my html:
<script language=javascript>
function disableValidation() {
Page_ValidationActive = false;
alert("1234");
}
</script>
The alert box is displayed but validation is still active.
How do I disable validation?
(In "classic" ASP .NET there is no problem)
Thanks,
Omri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.