Jquery ajax with multiple modal windows -
I am using a Struct application with JQuery as a Javascript library. I have JSP which calls a javascript method with a button that fire an AJAX request for an action. (Action 1) The action returns a JSP page that is displayed in a model window. Now, this JSP page is a button that calls another action (action 2) that returns a JSP page or should return to the base page. So here is a modal window click here or move forward to another modal window or base page. How can we complete this with JQuery? You can return the string "off" or html for the new modal window and do something with this line : $ .ajax ({url ('& lt; html') == -1) $ ('# modalwindow1'). Dialog ('off'); Otherwise {"some URL", success: work (data) {if (data. $ ('# Modalwindow2') .html (data); $ ('# modalwindow2'). Dialog ();}}}); Believes that you are using JQuery.dialog for your modal window