I hava a form for entering member number. When user enters membernumber and selects "Go" system should retrieve customer information. Customer information includes fname, lname,.. states (states customer lived in).
My requirment is that if no states exist for the customer, I should display an alert msg to user saying no states exist.
I have seen on thread on this topic, but I didn't get clear answer from that.
The JSP code runs on the server in order to format the page to send to the browser. Once the response is sent, the page is an HTML page just like any other. The fact that it was generated by a JSP is irrelevant.
If you need to contact the server for information after a client-side action, you either need to submit the page and reconstruct it with the new data (rather old-fashioned, at this point) or use Ajax to retrieve the data.
yes, I am reconstructing the form data with customer information after form submission from servlet. But customer object has list of states. If the states list is empty then I should alert msg to user. Would this be possible?