Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP PDF Hide element

former_member2492
Active Participant
0 Likes
1,076

Hi all I have

the element like this :

 DATA[*].MATERIAL

and I want to hide the element

 DATA[*].INV_ITM_PRICE 

when the material is empty.

How do I do it using javascript?

I also named the element material and added the following code:

if($.material == null )
{
this.presence = "hidden";
}

does not work .

How do I solve this?

Hi all I have

the element like this :

 DATA[*].MATERIAL

and I want to hide the element

 DATA[*].INV_ITM_PRICE 

when the material is empty.

How do I do it using javascript?

I also named the element material and added the following code:

if($.material == null )
{
this.presence = "hidden";
}

does not work .

How do I solve this?

2 REPLIES 2
Read only

RobertVit
Active Contributor
0 Likes
1,001

Hi,

try $.presence = "hidden"

Kind regards
Robert
Read only

Nawanandana
Active Contributor
0 Likes
1,001

I guess you need to check the value and your code will be correct.


Hide the element and shift lower elements up
if($.material.value == null)
{
this.presence ="hidden";
}


Hiding only the TEXT INSIDE the element NOT the element itself ,no shifting of other elements

if($.material.value == null)
{
this.presence = "invisible";
}