EasyUI Forum
May 09, 2024, 04:18:13 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: messager.prompt with predefined text  (Read 3813 times)
crosemffet
Jr. Member
**
Posts: 68



View Profile WWW Email
« 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,
Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #1 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');
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!