cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Schmitz <jeffandmon...@mac.com>
Subject Re: flowscript and multiple submit button
Date Wed, 24 Sep 2008 18:47:30 GMT
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: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
> -- 
> Andre H. Juffer              | Email: Andre.Juffer@oulu.fi
> 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: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>


Mime
View raw message