Online documentation - Websydian v6.1

FAQ - Several events on the MultipleInputGrid

Product Websydian Web Developer
Version All
Category Development
Question How do I get more than one event on the MultipleInputGrid
Answer

At present the MultipleInputGrid only supports one EventHandler if you need more than one EventHandler perform the following tasks.

 

  1. Add only one ProcessGrid MultipleEventHandler to the MultipleInputGrid pagegenerator.
  2. Add a process action field which is added to the variables Hidden, ExcludeFromSign and WebInput of the ProcessGrid function. This process action field is a status field with the possible values you need on the different buttons.
  3. Add the buttons needed to the document template under the form of the MultipleInputGrid make sure to add the small JavaScript which sets the correct value of the process action field e.g.
    <P><INPUT TYPE="SUBMIT" NAME="Update" VALUE="Update" onClick="document.AAg9F.MLTINPAC.value='2'"></P>
    <P><INPUT TYPE="SUBMIT" NAME="Delete" VALUE="Delete" onClick="document.AAg9F.MLTINPAC.value='1'"></P>

    In this case the implementation name of the process action field is MLTINPAC.
  4. Add code to the ProcessGrid to validate the value of the process action field in WebInput and call the appropriate functions depending on this value.