admin管理员组文章数量:1398684
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 want to open b.jsp as a Simple Window Modal, like the one given in that website link above.
- After clicking the submit button I want b.jsp to open in that manner.
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>
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 want to open b.jsp as a Simple Window Modal, like the one given in that website link above.
- After clicking the submit button I want b.jsp to open in that manner.
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>
Share
Improve this question
edited Oct 25, 2013 at 21:41
James-Jesse Drinkard
15.7k16 gold badges118 silver badges140 bronze badges
asked Feb 29, 2012 at 12:40
TomTom
7717 gold badges22 silver badges42 bronze badges
1 Answer
Reset to default 3Using 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
本文标签: javascriptopen a modal window in jspStack Overflow
版权声明:本文标题:javascript - open a modal window in jsp - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744160528a2593316.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论