I'd like to integrate one of the free color picker websites into my form. From a link on my form, users would open the color picker in a popup browser window and select a color which would then update the relevant input control on my form with the color specification in Hex format. Typically, these color pickers want you to supply them the ID of the element on the form to set once a color is chosen. Is this possible with Orbeon Forms? If not, is there another way for the color picker to send back the chosen color?
|
Review the javascript integration section: http://www.orbeon.com/ops/doc/reference-xforms-2#xforms-javascript The id you assign to input gets translated a bit, my-id becomes the id of a <span> that encloses the html input with the id "my-id- input" otherwise, yes, you can pass an id to your javascript. --Hank On Oct 15, 2008, at 10:29 AM, leifneve wrote: > > I'd like to integrate one of the free color picker websites into my > form. > From a link on my form, users would open the color picker in a > popup browser > window and select a color which would then update the relevant > input control > on my form with the color specification in Hex format. Typically, > these > color pickers want you to supply them the ID of the element on the > form to > set once a color is chosen. Is this possible with Orbeon Forms? If > not, is > there another way for the color picker to send back the chosen color? > -- > View this message in context: http://www.nabble.com/How-to- > integrate-a-color-picker-tp19998331p19998331.html > Sent from the ObjectWeb OPS - Users mailing list archive at > Nabble.com. > > > -- > You receive this message as a subscriber of the [hidden email] > mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws NEES@UCSB Institute for Crustal Studies, University of California, Santa Barbara 805-893-8042 -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
In reply to this post by leifneve
On Wed, Oct 15, 2008 at 10:29 AM, leifneve <[hidden email]> wrote:
> I'd like to integrate one of the free color picker websites into my > form. > [...] You might want to look into using XBL for this. We already have a color picker implemented in XBL and used in Form Builder. The source is in resources/apps/fr/components/standard.xbl. This color picker uses 3 sliders, which might not be what you had in mind, but you might find there some good inspiration. Relative to the XBL support in XForms, also see: http://wiki.orbeon.com/forms/projects/xforms-component-system Alex -- Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise Orbeon's Blog: http://www.orbeon.com/blog/ Personal Blog: http://avernet.blogspot.com/ Twitter - http://twitter.com/avernet -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
In reply to this post by Hank Ratzesberger
I flirted with this approach briefly. I tried to figure out what exactly the translated id
was and pass that into the Javascript function. Things got really hairy, though, when the input control was in a repeated section. It was still manageable with a lot of effort, but then I started worrying that I was essentially using a non-published interface that could change at any time. But here is an even worse problem: Setting the input control from a Javascript function was not equivalent to entering it from the user interface in terms of events generated. In fact, I'm not even sure if the referenced model is updated. I will look into the XBL approach that was mentioned. Maybe I can live with 3 sliders.
|
Administrator
|
On Oct 16, 2008, at 6:36 PM, leifneve wrote:
> I will look into the XBL approach that was mentioned. Maybe I can > live with > 3 sliders. Using 3 sliders takes quite a bit of space, and right now the sliders are not very configurable. But it might be still OK, depending on where you intend to display the color picker. For instance, if it is in a dialog, you might have enough real estate available anyway. Alex -- Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise Orbeon's Blog: http://www.orbeon.com/blog/ Personal Blog: http://avernet.blogspot.com/ Twitter - http://twitter.com/avernet -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Free forum by Nabble | Edit this page |