on 07-30-2009 6:26 AM
Hi,
In My Adobe Form there is a dropdown field(car Grade) having 12 values and "None" is one value among them.
e.g
Value1
Value2
Value3
.
.
.
None
Also in my form there is a radio button. Based on the selection from dropdown the radio button should be read only or open.
If no value selected i.e blank the radio button shud be read only and also when None is selected from the dropdown it shud be again read only.
What I have done now is this:
-
data.#subform[0].#subform[6].ISR_RadioButtonListGroup.ISR_RadioButtonList::initialize: - (JavaScript, client)
ISR_RadioButtonListGroup.ISR_RadioButtonList.access = "readOnly";
-
data.#subform[0].#subform[6].CarGrade::change: - (JavaScript, client) -
if (CarGrade.selectedIndex.value = 0 | CarGrade.selectedIndex.rawValue = "None" )
{
ISR_RadioButtonListGroup.ISR_RadioButtonList.access = "readOnly";
}
else
{
ISR_RadioButtonListGroup.ISR_RadioButtonList.access = "open";
}
But its not working. Also I tried with CarGrade.rawValue = "None", still not working.
Plz help
Thanks a lot Madhu, it worked for me.
But one more problem appeared.
BY selecting some value(other than None) from dropdown, radio button are open and after slecting Yes or No
when I again select None from the dropdown, the selected values Yes or No doesn't go away.
For that I did scripting like this:
-
data.#subform[0].#subform[6].CarGrade::change: - (JavaScript, client)
-
if ( selectedvalue == " " || selectedvalue == "None" )
{
ISR_RadioButtonListGroup.ISR_RadioButtonList.access = "readOnly";
if (ISR_RadioButtonListGroup.ISR_RadioButtonList.ISR_RadioButton[0].value = 2 || ISR_RadioButtonListGroup.ISR_RadioButtonList.ISR_RadioButton[0].value = 1)
{
ISR_RadioButtonListGroup.ISR_RadioButtonList.ISR_RadioButton[0].value = 0;
ISR_RadioButtonListGroup.ISR_RadioButtonList.ISR_RadioButton[0].value = 0;
}
}
else
{
ISR_RadioButtonListGroup.ISR_RadioButtonList.access = "open";
}
I tried with also ISR_RadioButtonListGroup.ISR_RadioButtonList.ISR_RadioButton[0].rawValue = 2
but still the earlier selected values doesn't go off.
Plz help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
try this
var selectedvalue = this.boundItem(xfa.event.newText);
xfa.host.messageBox("selected value"+selectedvalue);
if ( selectedvalue == " " || selectedvalue == "None" )
{
ISR_RadioButtonListGroup.ISR_RadioButtonList.access = "readOnly";
ISR_RadioButtonListGroup.ISR_RadioButtonList.rawValue = " ";
}
else
{
ISR_RadioButtonListGroup.ISR_RadioButtonList.access = "open";
}
Thanks,
Madhu.
Thanks a lot Madhu!!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
first for the cargrade dropdownlist goto Object Pallete->binding Tab->Specify Item Values
if it checked then you uncheck it and then
try the below script in the Change Event of cargrade
var selectedvalue = this.boundItem(xfa.event.newText);
xfa.host.messageBox("selected value"+selectedvalue);
if ( selectedvalue == " " || selectedvalue == "None" )
{
ISR_RadioButtonListGroup.ISR_RadioButtonList.access = "readOnly";
}
else
{
ISR_RadioButtonListGroup.ISR_RadioButtonList.access = "open";
}
just to check the value i have used this line
xfa.host.messageBox("selected value"+selectedvalue);
u can remove this after it is running correctly.
Thanks,
Madhu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.