In my application, I have a page called news.jsp that displays a list of news titles. Users can click on a title to read the full body of the news, which is loaded using AJAX within a span tag on the same page. Additionally, I display the top 5 news stories on my index.jsp.
If a user clicks on a news headline in index.jsp, I want to redirect them to my news.jsp and load the selected news story for them using AJAX once again.
However, when I try to redirect to news.jsp with JavaScript, this functionality does not work. Is there a way to update the content inside the span tag within news.jsp from index.jsp before redirecting?
My apologies for any errors in my English. Thank you.