Issue With Hiding Pages Dyamically



This type of question has been asked many times already. Existing forum posts have been very helpful in getting me closer to the answer however I'm still running into an issue that I was hoping to get some help with.

I am using Livecycle designer version 11 along with SAP to create the label. The label has two content areas, one 8.5in x 11in, the other 4in x 6in. There are two pages, linked to their respective content areas...


There is a parameter I pass to the form, IV_LETTER, which I am using to indicate whether to generate the Letter size or the Zebra size. When IV_LETTER = X, print the letter size, otherwise, generate the Zebra size.

I added the following Javascript to the initialization event for each page (I have also tried putting it in the FormReady event)....


var lv_letter = xfa.resolveNode("$record.IV_LETTER").value;

if( lv_letter = "X" ){

  data.PageZebra.presence = "hidden";



var lv_letter = xfa.resolveNode("$record.IV_LETTER").value;

if( lv_letter != "X" ){

  data.PageLetter.presence = "hidden";


When I test the label with IV_LETTER = X, the letter size only generates as expected. When IV_LETTER is blank, just a blank page generates.  

Does anyone have any ideas on what might be happening? Is there something with the multiple content areas that is causing a problem?

Any help would be greatly appreciated!

Accepted Solutions (1)

Accepted Solutions (1)



The equals operator in JavaScript is "==" and not "=".

You actually assigned "X" to lv_letter.

So your line should be

if ( lv_letter == "X" ) {

Does it work now?

Answers (1)

Answers (1)