Replace Javascript Confirm box with CFMessagebox

In my previous post (here to view), I've mentioned how to replace Javascript Alert box with CFMessageBox. Here again, to replace Javascript Confirm box with CFMessage.

view plain print about
1function DisplayMessageConfirm (obj, messageText) {
2    var RandCount = Math.random();
3    
4    ColdFusion.MessageBox.create(obj + RandCount, 'confirm', 'CESID', messageText, onfinish, {width:300, modal:true});
5    ColdFusion.MessageBox.show(obj + RandCount);
6}

[More]

To replace javascript alert with CFMessagebox

Before my development, I've already used native javascript alert for client side validation message. Some people might complaint why I used native javascript alert instead of jQuery dialogbox, it's because of I don't want to include so many script tags and CSS tags for jQuery mobile.

Today, I've got an idea to replace native javascript alert with cfmessagebox. This function will support to display cfmessagebox instead of javascript alert whenever we have put javascript alert in our coding.

[More]

Top of Page