开发者

Create a "wait message" in jsp

I need to create a "wait message" in jsp pa开发者_运维百科ge for x time, after pressing on the button and before the next page opens.


<script language="javascript">
function doBeforeSubmit()
{
  document.getElementById("displayBeforeSubmit").style.display = "none";
  document.getElementById("displayAfterSubmit").style.dispay = "block";
  return true; // you must return true or the form will not submit
}
</script>

<div id="displayBeforeSubmit">
<form action="results_page.jsp" method="post"
onsubmit="doBeforeSubmit()">
...
form stuff
...
</form>
</div>

<div id="displayAfterSubmit">
<h3>Please wait...</h3>
</div>

I hope that gives you an idea. In my opinion, you should try this "Please Wait" part in Javascript.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜