When the user search for a movie it gives them a list of movies that matches the search term So when they click on the movie I want them to be taken to another page(display div) that contains information about that movie. I want the page(div) that displays movies list to be replaced by another page(div) that contains movie information. I have tried achieve this by :
elements.searchResList.innerHTML = " ";
And then inserting the second page(div) that contains movie information:
Yes, I would like to display the movie information on the same page. I am using vanilla js. I have tried the innerHTMLA to remove the content of one div and then used insertAdjacentHtml to attach the info page to the container but the info page is displayed below it.