Another border.fill.color.value question

Avatar

Avatar

arpynrp

Avatar

arpynrp

arpynrp

17-08-2009

I am trying to script an if statement to define the background value depending on the instanceIndex of a subform.  I have tried it in the click event of the addButton and the indexChange event of the subform.  I saw an example of exactly what I am trying to do, but for the life of me I cannot locate it now.  I have searched both this forum and the users forum and I know it was in one of them.  Anyway, here is what the script looks like:

----- form1.Main_Subform.AdditionalAssaysSubform::indexChange: - (JavaScript, both) ----------------

if

(form1.Main_Subform.AdditionalAssaysSubform.instanceIndex == "0") {

form1.Main_Subform.AdditionalAssaysSubform.AddedAssaysDropdown.border.fill.color.value

= "240,240,240";

form1.Main_Subform.AdditionalAssaysSubform.AddedAssaysDataTable.border.fill.color.value

= "240,240,240";

form1.Main_Subform.AdditionalAssaysSubform.AddedAssayAvgNeg.border.fill.color.value

= "240,240,240";

form1.Main_Subform.AdditionalAssaysSubform.AddedAssayDisplacement.border.fill.color.value

= "240,240,240";

}

else

if(form1.Main_Subform.AdditionalAssaysSubform.instanceIndex == "2") {

form1.Main_Subform.AdditionalAssaysSubform.AddedAssaysDropdown.border.fill.color.value

= "240,240,240";

form1.Main_Subform.AdditionalAssaysSubform.AddedAssaysDataTable.border.fill.color.value

= "240,240,240";

form1.Main_Subform.AdditionalAssaysSubform.AddedAssayAvgNeg.border.fill.color.value

= "240,240,240";

form1.Main_Subform.AdditionalAssaysSubform.AddedAssayDisplacement.border.fill.color.value

= "240,240,240";

}

else

if(form1.Main_Subform.AdditionalAssaysSubform.instanceIndex == "4") {

form1.Main_Subform.AdditionalAssaysSubform.AddedAssaysDropdown.border.fill.color.value

= "240,240,240";

form1.Main_Subform.AdditionalAssaysSubform.AddedAssaysDataTable.border.fill.color.value

= "240,240,240";

form1.Main_Subform.AdditionalAssaysSubform.AddedAssayAvgNeg.border.fill.color.value

= "240,240,240";

form1.Main_Subform.AdditionalAssaysSubform.AddedAssayDisplacement.border.fill.color.value

= "240,240,240";

}

else

if(form1.Main_Subform.AdditionalAssaysSubform.instanceIndex == "6") {

form1.Main_Subform.AdditionalAssaysSubform.AddedAssaysDropdown.border.fill.color.value

= "240,240,240";

form1.Main_Subform.AdditionalAssaysSubform.AddedAssaysDataTable.border.fill.color.value

= "240,240,240";

form1.Main_Subform.AdditionalAssaysSubform.AddedAssayAvgNeg.border.fill.color.value

= "240,240,240";

form1.Main_Subform.AdditionalAssaysSubform.AddedAssayDisplacement.border.fill.color.value

= "240,240,240";

}

else

if(form1.Main_Subform.AdditionalAssaysSubform.instanceIndex == "8") {

form1.Main_Subform.AdditionalAssaysSubform.AddedAssaysDropdown.border.fill.color.value

= "240,240,240";

form1.Main_Subform.AdditionalAssaysSubform.AddedAssaysDataTable.border.fill.color.value

= "240,240,240";

form1.Main_Subform.AdditionalAssaysSubform.AddedAssayAvgNeg.border.fill.color.value

= "240,240,240";

form1.Main_Subform.AdditionalAssaysSubform.AddedAssayDisplacement.border.fill.color.value

= "240,240,240";

}

else

if(form1.Main_Subform.AdditionalAssaysSubform.instanceIndex == "1") {

form1.Main_Subform.AdditionalAssaysSubform.AddedAssaysDropdown.border.fill.color.value

= "255,255,255";

form1.Main_Subform.AdditionalAssaysSubform.AddedAssaysDataTable.border.fill.color.value

= "255,255,255";

form1.Main_Subform.AdditionalAssaysSubform.AddedAssayAvgNeg.border.fill.color.value

= "255,255,255";

form1.Main_Subform.AdditionalAssaysSubform.AddedAssayDisplacement.border.fill.color.value

= "255,255,255";

}

else

if(form1.Main_Subform.AdditionalAssaysSubform.instanceIndex == "3") {

form1.Main_Subform.AdditionalAssaysSubform.AddedAssaysDropdown.border.fill.color.value

= "255,255,255";

form1.Main_Subform.AdditionalAssaysSubform.AddedAssaysDataTable.border.fill.color.value

= "255,255,255";

form1.Main_Subform.AdditionalAssaysSubform.AddedAssayAvgNeg.border.fill.color.value

= "255,255,255";

form1.Main_Subform.AdditionalAssaysSubform.AddedAssayDisplacement.border.fill.color.value

= "255,255,255";

}

else

if(form1.Main_Subform.AdditionalAssaysSubform.instanceIndex == "5") {

form1.Main_Subform.AdditionalAssaysSubform.AddedAssaysDropdown.border.fill.color.value

= "255,255,255";

form1.Main_Subform.AdditionalAssaysSubform.AddedAssaysDataTable.border.fill.color.value

= "255,255,255";

form1.Main_Subform.AdditionalAssaysSubform.AddedAssayAvgNeg.border.fill.color.value

= "255,255,255";

form1.Main_Subform.AdditionalAssaysSubform.AddedAssayDisplacement.border.fill.color.value

= "255,255,255";

}

else

if(form1.Main_Subform.AdditionalAssaysSubform.instanceIndex == "7") {

form1.Main_Subform.AdditionalAssaysSubform.AddedAssaysDropdown.border.fill.color.value

= "255,255,255";

form1.Main_Subform.AdditionalAssaysSubform.AddedAssaysDataTable.border.fill.color.value

= "255,255,255";

form1.Main_Subform.AdditionalAssaysSubform.AddedAssayAvgNeg.border.fill.color.value

= "255,255,255";

form1.Main_Subform.AdditionalAssaysSubform.AddedAssayDisplacement.border.fill.color.value

= "255,255,255";

}

else

if(form1.Main_Subform.AdditionalAssaysSubform.instanceIndex == "9") {

form1.Main_Subform.AdditionalAssaysSubform.AddedAssaysDropdown.border.fill.color.value

= "255,255,255";

form1.Main_Subform.AdditionalAssaysSubform.AddedAssaysDataTable.border.fill.color.value

= "255,255,255";

form1.Main_Subform.AdditionalAssaysSubform.AddedAssayAvgNeg.border.fill.color.value

= "255,255,255";

form1.Main_Subform.AdditionalAssaysSubform.AddedAssayDisplacement.border.fill.color.value

= "255,255,255";

}

I have also tried to use the or ( | ) and combine the if's.  My question is... Am I using the correct event; am I placing the conditional statement in the appropriate place; or am I out in left field again?  Any suggestions would be very appreciated.  Thanks in advance. -rpeterson

View Entire Topic

Avatar

Avatar

Yasser__AST-IT_

Avatar

Yasser__AST-IT_

Yasser__AST-IT_

02-09-2009

Hi,

Thank you for your post, it was indeed very helpful.

Another question, how can I script the change of the fill property of non-interactive objects such as circle or rectangle objects.

For example, how some could change the fill type (i.e., solid, linear, radial, etc...) start color and end color, border colors, etc...

And where I can find more examples or reading material (with example) of referencing all the objects in XFA (especially the #ui stuff).

I have attached one document that I'm usually referencing and it talks about Circle objects, but  it seems it's very old and outdated and the examples for Circle object is not working with me, for sure, dose not cover the latest XFA sepcs.

I'm using Adobe LC Designer ES 8.2.x and Adobe Acrobat/Reader 9.2.

Appreciate your help...

BR,

Yasser