"Manual" form submission with Ajax.framework
"Manual" form submission with Ajax.framework
- Subject: "Manual" form submission with Ajax.framework
- From: Paul Hoadley <email@hidden>
- Date: Mon, 21 Apr 2014 14:42:46 +0930
Hello,
I'm working with a front-end designer who really wants to use the "bootstrap-select" customisation for drop-downs:
http://silviomoreto.github.io/bootstrap-select/
What happens here, roughly, is that bootstrap-select hides the regular select element on the rendered page, substitutes its own more easily styled markup, but updates the select element in the background (based on user interaction with its inserted structure) so that form submission still works.
There's a part of the application that uses a pair of "dependent drop-downs": the user makes a selection from the first, and the content of the second is updated based on the choice. This is currently implemented using an AjaxObserveField on the first drop-down and an AjaxUpdateContainer around the second, and everything is fine.
Enter bootstrap-select. The user doesn't interact directly with the first select element, so the AjaxObserveField never sees anything happen. (I take it that whatever bootstrap-select is doing in the background to keep the select element consistent is not triggering whatever the AjaxObserveField is waiting for.) We can trigger the AjaxUpdateContainer update manually on the second drop-down (by calling <containerID>Update()), but, of course, there's no form submission happening, so the selection made via the first drop-down is not being updated server-side and the second drop-down is not displaying the right content.
Obviously none of this is very surprising, as we're really fighting the AjaxObserveField here. In any case, some questions:
1. Is there an event we can fire to force the AjaxObserveField to notice the background (that is, not via the UI) update to the select that it's watching?
2. Failing that, is there a JavaScript hook to manually fire whatever the AjaxObserveField would fire, and cause the partial form submission?
--
Paul Hoadley
http://logicsquad.net/
_______________________________________________
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