• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Submit form and pop up a AjaxModalDialog confirming submission
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Submit form and pop up a AjaxModalDialog confirming submission


  • Subject: Re: Submit form and pop up a AjaxModalDialog confirming submission
  • From: Chuck Hill <email@hidden>
  • Date: Wed, 21 Apr 2010 17:20:02 -0700


On Apr 21, 2010, at 10:56 AM, 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>


You want to use an AjaxSubmitButton not the AjaxModalDialogOpener.

Replace

<wo:AjaxModalDialogOpener dialogId = "addToCartModalDialog"><wo:submitButton action = "$purchase">Purchase</ wo:submitButton></wo:AjaxModalDialogOpener>

With
<wo:ajaxSubmitButton action = "$purchase">Purchase</ wo:ajaxSubmitButton >


Then in the purchase method:


public void purchase() { // Your code here!

        AjaxModalDialog.open(context(), "addToCartModalDialog");
    }


Chuck

--
Chuck Hill             Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects








_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Submit form and pop up a AjaxModalDialog confirming submission (From: Benjamin Chew <email@hidden>)

  • Prev by Date: Re: announcement
  • Next by Date: Re: announcement
  • Previous by thread: Submit form and pop up a AjaxModalDialog confirming submission
  • Next by thread: Re: Submit form and pop up a AjaxModalDialog confirming submission
  • Index(es):
    • Date
    • Thread