开发者

Display message for few moments before next action

In JSF page I 开发者_运维技巧would like to display a message for a few seconds and then proceed with next action. e.g. If a record gets deleted, I would like to display "Item Deleted" for 10 seconds and then message disappears and user proceed with next action.

How can I do this?

My JSF version is 1.1

Thanks


You can use javascript timer like this:

buttonToNextAction - could either be a button or a link depends on your needs.

function showMessage(){

document.getElementById('msg_id').style.display = "inline";

setTimeout ( "misAndClick()", 10000);
}

function misAndClick(){
document.getElementById('msg_id').style.display = "hidden";
document.getElementById('buttonToNextAction').click();

}


I think JavaScript method is the only elegant method..

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜