I was close, but I was actually using button tags, e.g.

<button type="submit" name="ManageUsers" id="ManageUsers" value="Manage User Accounts">Manage User Accounts</button>

but I wasn't setting the value attribute since what shows on the button is whatever is between the tags. By adding the value attribute it now works.

Thanks,
Jeff

On Sep 24, 2008, at 12:53 PM, Andre Juffer wrote:

Jeff Schmitz wrote:
Hello,
In a flowscript function, what is the best way to figure which button made a submit on a multiple submit form? Can you get at that information via the cocoon.request object?

Your form (standard HTML):

 <input type="submit" value="Save"   name="edit" />
 <input type="submit" value="Update" name="edit" />
 <input type="submit" value="Done"   name="edit" />
 <input type="reset" />

In flowscript:
  var edit = cocoon.request.getParameter("edit");
  if (edit == "Save")
  {
    do_something();
  }
  else if (edit == "Update")
  {
    do_something_else();
  }
  else
  {
     do_another_thing();
  }

Thanks,
Jeff
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--
Andre H. Juffer              | Email: [EMAIL PROTECTED]
The Biocenter and            | WWW: www.biochem.oulu.fi/Biocomputing/
   the Dep. of Biochemistry | Fax: +358-8-553-1141
University of Oulu, Finland  | Phone: +358-8-553 1161
Triacle Biocomputing         | WWW: www.triacle-bc.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to