Skip to Content

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

Javascript validation

I have 3 input fields in my htmlb:form.

When the user presses the save button, this is what I do:

<htmlb:button id = "bg1" onClientClick = "chkformelements();"

onClick = "buttonPressed" >

In my javascript function I am reading the value of each field and raising alert accordingly (if they are balnk). Problem is: even when there is an alert scenario, my onclick server event still gets fired and does what I am trying to control.

How can I control (only fire) my onclick event depending on the outcome of onclientclick event maintained by js function?

Please help.



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