Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events
SOLVED

question listbox

Avatar

Level 4

hello, I have a problem with the listbox.

I have two listbox enabled and another one off.
If I select the first or second voice (AAA OR BBB), the second listbox is not enabled, but if I select the third item (CCC), the second listbox is enabled and so far everything works.

The problem is when you select many items

AAA + BBB + CCC or


AAA +  CCC or

BBB+ CCC

the second listbox is not enabled
How can I fix ??????

example PDF

click free user download example

1 Accepted Solution

Avatar

Correct answer by
Level 10

Thank you.. If you feel your issue is resolved, please make the thread as answered so it will be removed from the open discussions list.

Thanks

Srini

View solution in original post

10 Replies

Avatar

Level 10

Hi,

It is in your script:

var objList=this.nodes;

for(var i=0; i<objList.length; i++){

if(objList.item(i).tipo1.rawValue==1 || objList.item(i).tipo1.rawValue==2 ||

(objList.item(i).tipo1.rawValue==1 && objList.item(i).tipo1.rawValue==2)){

tipo2.mandatory="disabled";

tipo2.rawValue="";

tipo2.access="readOnly";

If "1" or "2" is selected or "1" and "2", then second listbox is locked. If you don't want that behaviour then remove the access script.

???

Niall

Avatar

Level 4

AAA or BBB if I select the second listbox should not be editable and works

CCC if I select the second listbox becomes editable and mandatory work

The problem is when I select CCC + BBB + AAA second list is not editable and mandatory same thing happens if I select CCC or CCC + BBB + AAA

Avatar

Level 10

Hi,

That is not what we are seeing here!!

Safari1.png

Once "CCC" is selected, the second listbox is available. Using LC Designer ES2 and Acrobat 9.

The script seems to work as scripted.

I think I am understanding your problem correctly, but I am not able to replicate it.

Niall

Avatar

Level 4

hello make an example

CCC I select the second listbox is enabled (works ok)

even if you later select BBB, and BBB and CCC Avro selected the second listbox is enabled (works ok)

if you later select BBB and AAA
the second listbox is editable, this is not good

I hope I have explained

Avatar

Level 10

Place the below code in the Exit event of the first listbox..

var vList = tipo1.rawValue.split("\n");
var sXML = "";
var strCCCSelected =0;
for (var i = 0; i < vList.length; i++)
{
//Check if the CCC is selected in the first listbox
if(vList[i] == 3)
  strCCCSelected = 1; 
}

//if CCC is selected in the first listbox, then make the second listbox as readonly.
if(strCCCSelected == 1){
tipo2.rawValue = "";
tipo2.access = "open";
}
else{
tipo2.rawValue = "";
tipo2.access = "readOnly";
}

Updated file is available at the below location.

https://acrobat.com/#d=EByY1WStmMssqzjQ*GJ0fw

Thanks

Srini

Avatar

Correct answer by
Level 10

Thank you.. If you feel your issue is resolved, please make the thread as answered so it will be removed from the open discussions list.

Thanks

Srini

Avatar

Level 4

there is a problem in the script blocks the designer preview

Avatar

Level 4

I rebooted the client machine and now works correctly

Avatar

Level 10

Can you explain in detail what is happening..

Can't you see the Preview in your Designer? If you can not see the Preview tab, just press F5 or View Menu -> Preview PDF.

If you can see Preview PDF tab but it is disabled, then there might be an issue with the Arobat Pro on your system.

Thanks

Srini