• 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: Accessing selected attributes before a form submit
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Accessing selected attributes before a form submit


  • Subject: Re: Accessing selected attributes before a form submit
  • From: Mike Schrag <email@hidden>
  • Date: Thu, 21 Aug 2008 15:27:49 -0400

I'm calling an Ajax action when the user selects from a list, but in
order to do anything, it needs to know which object is selected.
It sort of sounds like you're working too hard -- Offhand, why not just AjaxSubmitButton submit the form and handle this on the server where it has the originating object? If you're literally talking that you need access to the bound object from the JS side, you would need to do some data-passing to the server (with JSON or something equivalent), but I don't think this is what you're saying. If you just need to know the value of the selection, you can access it with Javascript via the yourSelectTag.options[yourSelectTag.selectedIndex]. But again, without knowing more about what exactly you're trying to do, I'll reiterate that it sounds like you're working too hard.

Everything worked out fine when
I put the updatelink inside the updatecontainer.
Definitely not required, btw. I use update links outside of update containers all the time, and the example apps have multiple examples of this. Not sure what you're seeing offhand. Are you extending ERXAjaxApplication/ERXAjaxSession/etc (or ERXApplication/ERXSession/ etc)?

ms

_______________________________________________
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: 
 >Accessing selected attributes before a form submit (From: A <email@hidden>)

  • Prev by Date: Re: Regarding the WO 5.4
  • Next by Date: Re: Webobjects-dev Digest, Vol 5, Issue 873
  • Previous by thread: Accessing selected attributes before a form submit
  • Next by thread: Re: Webobjects-dev Digest, Vol 5, Issue 873
  • Index(es):
    • Date
    • Thread