• 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: Farrukh Ijaz <email@hidden>
  • Date: Thu, 22 Apr 2010 20:29:10 +0300

Thanks Ben,

It depends what is convenient to for one. Chuck's solution is obviously better and he knows the benefits of that approach which I guess would take months for me to understand as I'm new to WebObjects and Wonder. However in my approach the "purchase" action doesn't get tied with addToCartModalDialog and I still have flexibility to set my own customized script function to run on onComplete event.

Farrukh

On 2010-04-22, at 7:58 PM, Benjamin Chew wrote:

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@hidden> 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@hidden)

This email sent to email@hidden


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>)
 >Re: Submit form and pop up a AjaxModalDialog confirming submission (From: Farrukh Ijaz <email@hidden>)
 >Re: Submit form and pop up a AjaxModalDialog confirming submission (From: Benjamin Chew <email@hidden>)

  • Prev by Date: Re: Finding why two UPDATES are send
  • Next by Date: Javascript is not called by AjaxSubmitButton
  • Previous by thread: Re: Submit form and pop up a AjaxModalDialog confirming submission
  • Next by thread: Finding why two UPDATES are send
  • Index(es):
    • Date
    • Thread