Skip to Content

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

How to invoke a onClick call to JSP method from Javascript

Currently developing in the JSP Dynpage model in EP 5, but will also be developing in EP 6, once we get our hands on the installer.

My Question is, with the above environment, how do you force a call to the JSP method from a javascript call, in the case where you are using Client Side eventing, and want to mimic a Button Click, etc...

In the JSP page I have a HTMLB button defined as

<hbj:button id='Load' text="Load WorkBench" onClick="clickLoad" onClientClick="Validate()"/>

and the method clickLoad is in my Dynpage to handle when the user clicks on it.

I also know how to cancel the submit process of the button click in a call from the Validate() function with:

htmlbevent.cancelSubmit=true;

But, if I was in a seperate javascript function that is subscribed to some client event, how would I make the iView call that method clickLoad, as if the user clicked on that button. Also, would like to know how to do this genericly and not just for a button. It was the easiest way to explain it using a button.

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