I was able to find one solution regarding modal windows, here is the link: Simple jQuery Modal Window Examples. However, what I want specifically is:
I tried several solutions, but I can't get it to work the same way.
Here is my code below:
a.jsp
<form action="b.jsp">
<input type="submit" value"click here to open modal window"/>
</form>
Using JQuery UI is very easy.
I do some changes:
Change type to button because you don´t nee sudmit form for load html.
<div id="resultreturn" style="display: none"></div>
<form >
<input type="button" value="click here to open modal window" id="loader"/>
</form>
Later I bind a event click an in this event:
$(document).ready(function(){
$("#loader").click(function(){
// Load the page into the div
$("#resultreturn").load("b.html");
// Show the modal dialog
$("#resultreturn").dialog({ modal: true });
});
});
I hope this help you