Here's how you can invoke a WEBEVENT form from a WAM form:
This function can be called in the same way the HandleEvent() function is called now.
3. The parameters are HandleWebEvent(Process, Webevent, Form, Target, "ASURNAME", "ASTDRENTRY", ...), a variable number of parameters on the end can be passed for fields, the values of which are to be passed to the WebEvent. The parameters are all characters strings except for Form, which should be the actual form DHTML object (eg. document.MYFORM). It is important to provide a single character prefix before the field name. The prefix is A for Alphanumeric, P for Packed and S for Signed fields, or Q for RDMLX fields. This prefix is required so that a WEBEVENT being invoked is able to exchange the passed field values.
5. As a result, a WebEvent LANSA function is executed passing the specified field values and a WebEvent page is shown in the browser.
How a WAM form can initiate a WEBEVENT form and pass information to it:
Consider a Search WAM form, which submits to a Browse WEBEVENT, but passing the entered SURNAME field value.
In LANSA Editor's Details tab you enter 'HandleWebEvent("MYPROC", "MYFUNC", null, null, "ASURNAME", "ASTDRENTRY"); return false;' for presubmit_js property of the Search button.
When you run this page in the browser, clicking on Search button will submit to a WEBEVENT, showing its page in the browser, after it completes execution.