-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I have this:
<button id="openreportbutton" action="onclick:openReport()" onClick="storeChoices()" label="Show Report" />
First the choices are stored in session in a serverside method, than clientside openReport is executed, which does window.open("another.zul") that picks up the values from the session. But storeChoice also checks choosen values.
Now if something was missed, i want to set something in the page, e.g. a label turns to red, and only afterwards first check the color of the value in the javascript function before launching the other zul.
How can i synchronise both calls: so first an Ajax call from ZK, change the labelcolor, then call openReport, to check $("${label.uuid}").getStyle("color")
eh, i see that a short timeout does the trick, but is there an exact method?
<button id="openreportbutton" action="onclick:setTimeout('openReport()',100)" onClick="storeChoices()" label="Show Report" />
Regards, Huub
I think maybe this will play the trick.
<button id="openreportbutton" label="Show Report"> <attribute name="onClick"> storeChoices(); Clients.evalJavaScript("openReport()"); </button>
Just use Clients.evalJavaScript("openReport()");
Asked: 2008-11-13 20:11:35 +0800
Seen: 178 times
Last updated: Dec 08 '08