EasyUI Forum
April 19, 2024, 04:00:28 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Keeping textbox value and screen in sync  (Read 2900 times)
stephenl
Newbie
*
Posts: 30


View Profile
« on: July 04, 2021, 03:01:25 AM »

Inorder to keep a textbox value and the displayed value in sync, I need to issue 2 statements

        // As a test - populate the value with 99
        $(this).find("input[name='seq1']").attr("value",99);
        // Value changes but screen doesn't update

        // Using textbox method updates the screen but not the value
        $("#seq1").textbox('setText', 99);

Is there a way in which both the value and screen can be updated with one statement ?

Thank you

Logged
stephenl
Newbie
*
Posts: 30


View Profile
« Reply #1 on: July 04, 2021, 07:57:48 AM »


setText and setValue does this trick

$(d).textbox('setText', 99).textbox('setValue', 99);
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!