Thanks Chuck and Farrukh! I ended up going with Chuck's solution in the end
as it was a little cleaner to do open the ModalDialog programmatically.

Ben

On Wed, Apr 21, 2010 at 7:57 PM, Farrukh Ijaz <
[email protected]> wrote:

> Try this, I use AjaxSubmitButton instead of AjaxModalDialogOpener using
> javascript function. If your component has an AjaxModalDialog component with
> some id "sampleDialog", you'll have a javascript function at runtime as
> "openAMD_SampleDialog()" to open the dialog.
>
> <wo:form name="PurchaseForm" multipleSubmit = "$true">
>   <wo:FocusTextField id = "purchasePart" size = "20" value =
> "$purchasePartNumber" focus = "true" />
>   <wo:textfield id = "purchaseQty" size = "20" value = "$purchaseQty"
> numberformat = "0" />
>   <wo:AjaxSubmitButton value = "Purchase" action = "$purchase" formName =
> "EditForm" onComplete = "openAMD_AddToCartModalDialog()"/>
>
> </wo:form>
>
>
> Farrukh
>
> On 2010-04-21, at 8:56 PM, Benjamin Chew wrote:
>
> How do you tie a form submission to an AjaxModalDialog?
>
> I'm trying to submit a form, process the values with the method "purchase"
> and pop up the result (added to cart or error). Right now I have this and it
> doesn't work:
>
> <wo:form>
>   <wo:FocusTextField id = "purchasePart" size = "20" value =
> "$purchasePartNumber" focus = "true" />
>    <wo:textfield id = "purchaseQty" size = "20" value = "$purchaseQty"
> numberformat = "0" />
>   <wo:AjaxModalDialogOpener dialogId = "addToCartModalDialog"><
> wo:submitButton action = "$purchase">Purchase</wo:submitButton></
> wo:AjaxModalDialogOpener>
> </wo:form>
>
>
> Thanks,
> Ben
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      ([email protected])
> Help/Unsubscribe/Update your Subscription:
>
> http://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com
>
> This email sent to [email protected]
>
>
>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to