Expand my Community achievements bar.

ADOBE : TABLE - Hide ROW NOT Working - ONLY INVISIBLE

Avatar

Level 1

Hello Guys,

 

A basic question, I created a Table in my page, and I want to HIDE a ROW by default in JAVASCRIPT cause I will add afterwards conditions. The problem is: my row is never HIDDEN but only INVISIBLE. Consequently, the others rows below never take place of the HIDDEN row. I don't see anything wrong in my code. Could you please have a look on it:

 

rachidroughi_0-1709380616246.png

 

 

The row is always here, invisible but NOT hidden:

 

rachidroughi_1-1709380823046.png

 

 

 

Best regards,

RR.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

6 Replies

Avatar

Community Advisor

did you try display attribute?

 

// Hide a table row
document.getElementById("myRow").style.display = "none";

// Show a table row
document.getElementById("myRow").style.display = "table-row";

 

// Remove a table row
document.getElementById("myRow").remove();

Avatar

Level 1

Thank you for reply.

 

I saw that in Master Pages the JavaScript does not work on the design of the page. The design is static and doesn’t change.

 

Do you confirm that point too?

 

Regards.

Avatar

Community Advisor

do you mean in design mode?

In Adobe Experience Manager, the JavaScript code might not work in the design mode as it has some restrictions.

Generally design mode has some restrictions with default authoring capabilities.

In design mode, AEM restricts some JavaScript functionalities to prevent interference with the authoring UI. If your JavaScript code is trying to manipulate the DOM or perform other actions that are restricted in design mode, it might not work.

Avatar

Level 1

Yes, we are probably talking about the same thing:

 

17D623F3-EE5C-468E-AC12-C87A33CBE6FD.jpeg


Thank you for replying.

Regards,

Avatar

Administrator

@RachidR_ Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.



Kautuk Sahni