Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8931847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:12:14+00:00 2026-06-15T09:12:14+00:00

Hi i know valueUpdate: afterkeydown will do model update after user input but I

  • 0

Hi i know valueUpdate: afterkeydown will do model update after user input but I want to know how can i do valueUpdate automatically after some other javascript code changes value

I have a js code that does document.getElementById(“input”).value = “new value”;

do i have to update model manually or what valueUpdate should i use.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T09:12:15+00:00Added an answer on June 15, 2026 at 9:12 am

    If you trigger the change event for the element, then the element’s binding (value) will pick up the change and process it normally.

    However, generally you would want to make your updates through the view model and let the bindings handle setting the element’s properties, but if you have 3rd party or existing code that interacts directly with the element that cannot be changed, then triggering the change event is a solution.

    Knockout does include a utility to trigger an event properly cross-browser called ko.utils.triggerEvent.

    Your code might look like:

       var elem = document.getElementById("input");
       elem.value = "new value";
       ko.utils.triggerEvent(elem, "change");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know you can not set a key value dynamically, but what about the
I know the input have the maxlength, but I would like to have minlength
here's my code. <input type=text placeholder=Add New Tag data-bind=value: tagToAdd, valueUpdate: 'afterkeydown', event: {
I know regex and substrings is a common question on here but i can
I know we can do correlated subqueries and join. But which one is faster?
I know the title is not great but I think the code will come
I know I can easily do this with a few lines of PHP but
I know that you can use DirectoryIndex example.html in .htaccess, but what I need
I know some basic about iOS programming, now i want to connect my app
I know we can trigger an Intent.ACTION_SEND intent to send email. But according to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.