0

radiobutton and selection

asked 2010-04-24 07:32:26 +0800

shamna gravatar image shamna
84 1

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

delete flag offensive retag edit

5 Replies

Sort by ยป oldest newest

answered 2010-04-26 20:37:56 +0800

jimmyshiau gravatar image jimmyshiau
4921 5
http://www.zkoss.org/ ZK Team

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>

link publish delete flag offensive edit

answered 2011-02-21 15:20:51 +0800

Srivalli gravatar image Srivalli
33

updated 2011-02-21 15:52:04 +0800

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 ?

link publish delete flag offensive edit

answered 2011-02-22 03:28:42 +0800

jimmyshiau gravatar image jimmyshiau
4921 5
http://www.zkoss.org/ ZK Team

updated 2011-02-22 03:29:47 +0800

Hi Srivalli,
can you provide a sample?
and what version ZK did you using?

link publish delete flag offensive edit

answered 2011-02-22 12:54:13 +0800

Srivalli gravatar image Srivalli
33

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.

link publish delete flag offensive edit

answered 2011-02-22 15:39:00 +0800

twiegand gravatar image twiegand
1807 3

updated 2011-02-22 15:39:44 +0800

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

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2010-04-24 07:32:26 +0800

Seen: 1,914 times

Last updated: Feb 22 '11

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More