-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi all,
I'm using farbtastic jquery color picker on my project and one thing I've noticed is that when I use the drag and drop functionnality to choose a color (see demo here http://acko.net/blog/farbtastic-jquery-color-picker-plug-in/) the input element is updated so many times (perhaps too fast too) that ZK does not keep pace with the updates and in the end it simply does not give me the last picked color in my composer when I'm calling Textbox.getValue().
On the other hand, if you don't use the drag and drop functionnality but directly click on the panel to choose a color, the problem doesn't arise.
My first thinking was to call Clients.evalJavaScript() to directly retrieve the input element value but this method does not return the result of the evaluation... What other solutions can I use to get the last updated value of my input element on the client side ? If you have better ideas,feel free to answer too :)
Thanks for the help.
Hi Jimmy Shiau,
I finally found a solution to my problem. In my zul file, I attached this piece of javascript code to force a last refresh :
zAu.send(new zk.Event(
zk.Widget.$(selected),
'onChange', {value:$(selected).attr("value")}, {toServer: true}
));
Thx for your answer.
Hi clementtrung,
Can you post your sample code?
Asked: 2013-01-17 03:01:55 +0800
Seen: 35 times
Last updated: Jan 17 '13