-
FEATURED COMPONENTS
First time here? Check out the FAQ!
<button id="btnPrnPrint" label="Print!" width="75px" action="onclick:test('2nd')"/>
<script type="text/JavaScript">
<![CDATA[
function test(tbxsss) {
alert(tbxss)
}
]]>
</script>
How can I call 2 methods and the priority is first call :
1 )contractEditor.btnPrnPrintOnClick(); which will set the value of the label
2) onclick:onCall(lbl.value) -- javascript fucntion...
Please tell me how can I do that I tried below possiblities :
1)action="onclick:contractEditor.btnPrnPrintOnClick();test('2nd');"/> -- doesn't call btnPrnPrintOnClick()
2)action="onclick:contractEditor.btnPrnPrintOnClick(),test('2nd');"/> -- doesn't call btnPrnPrintOnClick()
3)OnClick="contractEditor.btnPrnPrintOnClick()" action="onclick:test('2nd')" -- Both are called at the same time..
4) OnClick="contractEditor.btnPrnPrintOnClick(),test('2nd');"
Either the above way onclick or anyotherway where I can have "contractEditor.btnPrnPrintOnClick() be called first when the window is loaded and then on that button click I can have the action to call that javascript..
Please help
I found a way but still stuck..
<label id="lblUrl" visible="false"/>
<button id="btnPrnPrint" label="Print!" width="75px" onClick='contractEditor.btnPrnPrintOnClick();alert(lblUrl.value);Clients.evalJavaScript("test(lblUrl.value)")'/>
But lblUrl is not recognized when I run this page.. can anyone please help me as to how to pass the values from ZK element to the javascript's function.
Asked: 2009-03-25 17:29:25 +0800
Seen: 1,349 times
Last updated: Mar 30 '09