Hello again,
I´m facing a new problem here:
I thought this was working fine but after several checks and unchecks I arrive to unwanted states, like the ones that follows:
I have the following code on each of the Radio/ Checks (I´m deleting all form1.subform. etc etc, to justo leave the fields names):
1- Video Monitor Radio
form1.Subform2.RadioButtonListVideo::click - (JavaScript, client)
if (this.rawValue == "1") {
TextVM1.font.lineThrough = "1";
TextVM1.font.fill.color.value = "195,195,195";
CheckBox1.access = "readOnly" ;
TextVM2.font.lineThrough = "1";
TextVM2.font.fill.color.value = "195,195,195";
CheckBox10.access = "readOnly" ;
} else {
TextVM1.font.lineThrough = "0";
TextVM1.font.fill.color.value = "51,51,51";
CheckBox1.access = "open" ;
TextVM2.font.lineThrough = "0";
TextVM2.font.fill.color.value = "51,51,51";
CheckBox10.access = "open" ;
}
2- Meal Tray Radio
form1.Subform2.RadioButtonListMealT::click - (JavaScript, client)
if (this.rawValue == "1") {
TextMT1.font.lineThrough = "1";
TextMT1.font.fill.color.value = "195,195,195";
CheckBox2.access = "readOnly" ;
TextMT2.font.lineThrough = "1";
TextMT2.font.fill.color.value = "195,195,195";
Subform2.CheckBox11.access = "readOnly" ;
} else {
TextMT1.font.lineThrough = "0";
TextMT1.font.fill.color.value = "51,51,51";
CheckBox2.access = "open" ;
TextMT2.font.lineThrough = "0";
TextMT2.font.fill.color.value = "51,51,51";
CheckBox11.access = "open" ;
}
3- Right Checkboxes
-------> Video Monitor CheckBox
form1.Subform3.CheckBox1::click - (JavaScript, client)
if (this.rawValue == "1" || CheckBox11.rawValue == "1" ) {
// meal tray of the right
CheckBox2.access = "readOnly" ;
TextMT1.font.lineThrough = "1";
TextMT1.font.fill.color.value = "195,195,195";
//other video monitor, on the left
CheckBox10.access = "readOnly" ;
TextVM2.font.lineThrough = "1";
TextVM2.font.fill.color.value = "195,195,195";
}
else {
//have to go back to "normal" states, by normal I mean not readonly, not striketrough and black font color
CheckBox2.access = "open";
TextMT1.font.lineThrough = "0";
TextMT1.font.fill.color.value = "51,51,51";
CheckBox10.access = "open";
TextVM2.font.lineThrough = "0";
TextVM2.font.fill.color.value = "51,51,51";
}
-------> Meal Tray CheckBox
form1.Subform3.CheckBox2::click - (JavaScript, client)
if (this.rawValue == "1" || CheckBox10.rawValue == "1") {
// video monitor, right
CheckBox1.access = "readOnly" ;
TextVM1.font.lineThrough = "1";
TextVM1.font.fill.color.value = "195,195,195";
//the other meal tray, on the left
CheckBox11.access = "readOnly" ;
TextMT2.font.lineThrough = "1";
TextMT2.font.fill.color.value = "195,195,195";
}
else {
//have to go back to "normal" states
CheckBox1.access = "open";
TextVM1.font.lineThrough = "0";
TextVM1.font.fill.color.value = "51,51,51";
CheckBox11.access = "open";
TextMT2.font.lineThrough = "0";
TextMT2.font.fill.color.value = "51,51,51";
}
4- Left Checkboxes
-------> Video Monitor CheckBox (is the same code as themeal tray from the right)
form1.Subform3.CheckBox11::click - (JavaScript, client)
if (this.rawValue == "1" || CheckBox10.rawValue == "1") {
// video monitor, right
CheckBox1.access = "readOnly" ;
TextVM1.font.lineThrough = "1";
TextVM1.font.fill.color.value = "195,195,195";
//the other meal tray, on the left
CheckBox11.access = "readOnly" ;
TextMT2.font.lineThrough = "1";
TextMT2.font.fill.color.value = "195,195,195";
}
else {
//have to go back to "normal" states
CheckBox1.access = "open";
TextVM1.font.lineThrough = "0";
TextVM1.font.fill.color.value = "51,51,51";
CheckBox11.access = "open";
TextMT2.font.lineThrough = "0";
TextMT2.font.fill.color.value = "51,51,51";
}
-------> Meal Tray CheckBox (is the same code as the video monitor from the right)
form1.Subform3.CheckBox1::click - (JavaScript, client)
if (this.rawValue == "1" || CheckBox11.rawValue == "1" ) {
// meal tray of the right
CheckBox2.access = "readOnly" ;
TextMT1.font.lineThrough = "1";
TextMT1.font.fill.color.value = "195,195,195";
//other video monitor, on the left
CheckBox10.access = "readOnly" ;
TextVM2.font.lineThrough = "1";
TextVM2.font.fill.color.value = "195,195,195";
}
else {
//have to go back to "normal" states, by normal I mean not readonly, not striketrough and black font color
CheckBox2.access = "open";
TextMT1.font.lineThrough = "0";
TextMT1.font.fill.color.value = "51,51,51";
CheckBox10.access = "open";
TextVM2.font.lineThrough = "0";
TextVM2.font.fill.color.value = "51,51,51";
}
Any ideas on how to make this work right?
Also, how do I format the text to appear like code?
Thanks !!!!!
Views
Replies
Total Likes
I took a different approach. To save on codeing I made the checkboxes at the bottom radio buttons then I gave the same name and global bindings. I inverted their values to left a=1, b=2 and on the right a=2, b=1. I didn't go to the trouble of coding all the cross out/access script you have but here is a rudimentary interpretation of what I think you want here.
PS to make your text look like code, click on Use advanced editor on the top right of the text box. There is a small chevron button that appears giving you more options.
Kyle
Views
Replies
Total Likes
Thanks!
Views
Replies
Total Likes
Nice trick Kyle!
Views
Replies
Total Likes