Re: Accessing selected attributes before a form submit
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