EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: crosemffet on June 06, 2016, 04:01:40 AM



Title: messager.prompt with predefined text
Post by: crosemffet on June 06, 2016, 04:01:40 AM
hello, and thanks in advance for your support.
i need show one messager.prompt with one predefined text.
i mean when the messager windows shows, the field show one specific text, example:
   $.messager.prompt('title', 'message', function(r){
      if (r){
         alert('you type: '+r);
      }
   });
the idea is not to show a blank field to enter the text r, is to show one predefined value in the text field.
any idea...?
thanks,


Title: Re: messager.prompt with predefined text
Post by: jarry on June 06, 2016, 06:33:34 PM
Please try this code:
Code:
var dlg = $.messager.prompt('My Title', 'Please type something', function(r){
if (r){
alert('you type: '+r);
}
});
dlg.find('.messager-input').val('predefined text');