How to reload the one component after click on the other component in the same page? AEM6.3

Avatar

Avatar

aravindS

Avatar

aravindS

aravindS

08-07-2019

Hi,

I created the page with emultiple components, my requirement is load the one component after click (some button) on other component in the same page.

Thanks in Advance

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

Tuhin_Ghosh

Avatar

Tuhin_Ghosh

Tuhin_Ghosh

17-07-2019

You could use JS show hide function on the div of second component which would be managed/called by the button click of first component as rightly mentioned by Arun.

How To Toggle Between Hiding And Showing an Element

Thanks

Tuhin

Answers (3)

Answers (3)

Avatar

Avatar

aravindS

Avatar

aravindS

aravindS

22-07-2019

That's for our case we are using like that only, but At first time page loaded only all the components are loaded.. But i need to show the component after the clicking of the second component button (it should pass data to 3rd component).

Thanks..

Avatar

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

1.1K

Correct Reply

839

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

1.1K

Correct Reply

839
Arun_Patidar
MVP

17-07-2019

I don't think, that is a good practice.

But you can load both components and hide the second one and show when the button is clicked.

It can be done with a simple js code.

Avatar

Avatar

joeb21688728

Avatar

joeb21688728

joeb21688728

17-07-2019

Components are supposed to be loaded in Editable Templates or on pages where a policy has been set allowing a component to be dropped onto the page.