Greetings Gurus:
I am appending data, via Jquery and AJAX from an external
JSP to an existing JSP when a user clicks on a link. For example:
1. This page (page1.jsp) has three HTML tables on it that are populated with data via a servlet/database (
servlet number 1) when the page loads. (I load records based on rownum >=0 <= 10 for instance)
2. Then the user clicks a link on this page (page1.jsp) which calls another servlet (servlet number 2) that populates another jsp (page2.jsp). (I load records based on rownum >=10 <= 11 for instance)
3. Using Jquery/Ajax I then append the contents of page2.jsp into one of the tables on page1.jsp.
Kind of confusing I know but it works fine. But my problem is this: How do I tell the original page (page1.jsp) when there is no more data to be appended? For example the user clicks the link on page one and never knows that there returning recordset is empty. Ideally I would like to hide the link on page1.jsp that allows them to add more records when the recordset is empty. I can tell on the page2.jsp and servlet number 2 that there are no more records but how do I pass this info back to page1.jsp?
I know this might be a little confusing but I have not been able to figure this one out.
Any help would be greatly appreciated!