EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: arma on October 15, 2013, 08:20:33 AM



Title: Default Value for $.messager.prompt
Post by: arma on October 15, 2013, 08:20:33 AM
Is there a way to speficy default textbox value for $.messager.prompt ? It would be nice if there's one more parameter after callback parameter.

Code:
$.messager.prompt('My Title', 'Please type something', function(r){
                if (r){
                    alert('you type: '+r);
                }
            }, 'default value parameter here');

My Workaround at the moment :
Code:
$.messager.prompt('My Title', 'Please type something', function(r) {
                if (r) {
                    alert('you type: ' + r);
                }
            });
            $('.messager-input').val('default value').focus();