Jump to content

Formatted input for uniEdit


zilav

Recommended Posts

  • 4 years later...
On 4/4/2013 at 11:32 AM, liugang73 said:

correct original project(ok for 9x version of unigui)

 

correct procedure TMaskedInput.Format(UniEditControl: TUniEdit);
var
  i: integer;
  js: string;
begin
  js := '';
  for i := 0 to definitions.Count-1 do
    js := js + SysUtils.Format('$.mask.definitions[''%s'']=''[%s]'';', [definitions.Names, definitions.ValueFromIndex]);
 js := js + SysUtils.Format('$("#%s_id-inputEl").mask("%s");', [uniEditControl.JSName, mask]);
 // js := js + SysUtils.Format('jQuery(function(){jQuery("#%s_id-inputEl").mask("%s");});', [uniEditControl.JSName, mask]);
  UniSession.AddJS(js);
 // UniSession.AddJS(Format('jQuery(function(){jQuery("#%s_id-inputEl").mask("%s");});', [Ed.JSName, MaskStr]));
end;
 

Hello, Can anyone tell me how do I set a value for a UniEdit at runtime?

I have been trying:
UniEdit1.JSInterface.JSCode ('$ ("#" +' # 1'.inputEl.id) .text ("'NewText'"); ');

but nothing happens!

can you help me?

Link to comment
Share on other sites

9 minutes ago, DEV_THS said:

Hello, Can anyone tell me how do I set a value for a UniEdit at runtime?

I have been trying:
UniEdit1.JSInterface.JSCode ('$ ("#" +' # 1'.inputEl.id) .text ("'NewText'"); ');

but nothing happens!

can you help me?

[R E S O L V E D]

UniEdit1.JSInterface.JSCode ('$ ("#" +' # 1'.inputEl.id) .val("'NewText'"); ');

Link to comment
Share on other sites

  • 1 year later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...