-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi
I have a radiogroup with 2 radio button. Corresponding to each radio button there is a datebox. I want the datebox to become selectable only after i select a particular radiobutton during when other radio buton's datebox should not be editable.
I Need help as soon as possible...
plz reply
Hi
I create a sample
<zk> <radiogroup onCheck="event.target.nextSibling.disabled = false;"> <radio onCheck="db2.disabled = true;" /> <datebox id="db1" disabled="true"/> <radio onCheck="db1.disabled = true;"/> <datebox id="db2" disabled="true"/> </radiogroup> </zk>
Hi as1225,
if I use the above code, I'm getting event.target cannot be resolved or is not a field warning .
I have
import org.zkoss.zk.ui.event.*;
import org.zkoss.zul.impl.XulElement;
import org.zkoss.zul.Radiogroup;
import org.zkoss.zul.Radio;
in my import list. What else should I import to avoid this ?
Hi Srivalli,
can you provide a sample?
and what version ZK did you using?
Hi as1225
<vbox>
<radiogroup onCheck="event.target.nextSibling.disabled = false;">
<grid width="320px" height="90px">
<columns>
<column label="Service" width="150px" />
<column label="DSN (Required)" />
</columns>
<rows>
<row>
<radio id="Op1" label="New Install" onCheck="Op2.disabled = true;"/>
<textbox id="NewInstallDSN" value=" "/>
</row>
<row>
<radio id="Op2" label="Replace Device" />
<textbox id="ReplaceDeviceDSN" value=" " />
</row>
<row>
<radio id="Op3" label="Service" />
<textbox id="ServiceDSN" value=" " />
</row>
</rows>
</grid>
</radiogroup>
</vbox>
I'm getting event.target cannot be resolved or is not a field warning.
similarly op2 cannot be resolved or is not a field.
I underlined these in the code.
Srivalli.
As Jimmy asked previously, what version of ZK are you running? His code runs fine in ZK 5.0.5 (so does yours, albeit probably not the way you want it to).
If you have ZK 5 or above, then you have a much deeper issue than one related to code - most likely library contention...
Todd
Asked: 2010-04-24 07:32:26 +0800
Seen: 1,914 times
Last updated: Feb 22 '11