• 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: Ajax submit when "Enter" pressed on form fields
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ajax submit when "Enter" pressed on form fields


  • Subject: Re: Ajax submit when "Enter" pressed on form fields
  • From: Benjamin Chew <email@hidden>
  • Date: Fri, 23 Apr 2010 15:40:19 -0700

Chuck, you are the man. Sorry for being such a noob. 

Thanks for writing that, btw. :)

Ben

On Fri, Apr 23, 2010 at 3:31 PM, Chuck Hill <email@hidden> wrote:
AjaxDefaultSubmitButton



On Apr 23, 2010, at 3:26 PM, Benjamin Chew wrote:

Hi guys,

I'm using an AjaxSubmitButton to submit a form and pop up an AjaxModalDialog in the process. Does anyone know of a way that I could do that same submission when a user presses "Enter" in any of my form fields?

I've tried using the js "click()" method to no avail.

Thanks,
Ben

Code:

<wo:form id = "quickorderform">

   Part Number
   <wo:textfield id = "purchasePart" size = "20" value = "$purchasePartNumber" default = "catalog part #" (event.keyCode == 13) document.getElementById('quickOrderSubmitButton').click()"/>
   <br />
   Qty
   <wo:textfield id = "purchaseQty" size = "20" value = "$purchaseQty" numberformat = "0" default = "qty" (event.keyCode == 13) document.getElementById('quickOrderSubmitButton').click()"/>
   <br />
   <wo:AjaxSubmitButton id = "quickOrderSubmitButton" action = "" value = "purchase"></wo:AjaxSubmitButton>
</wo:form>
_______________________________________________
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

--
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

  • Follow-Ups:
    • Re: Ajax submit when "Enter" pressed on form fields
      • From: Chuck Hill <email@hidden>
References: 
 >Ajax submit when "Enter" pressed on form fields (From: Benjamin Chew <email@hidden>)
 >Re: Ajax submit when "Enter" pressed on form fields (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: Ajax submit when "Enter" pressed on form fields
  • Next by Date: Re: Ajax submit when "Enter" pressed on form fields
  • Previous by thread: Re: Ajax submit when "Enter" pressed on form fields
  • Next by thread: Re: Ajax submit when "Enter" pressed on form fields
  • Index(es):
    • Date
    • Thread