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

  • Home
  • SEARCH
  • 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 6191145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T02:42:47+00:00 2026-05-24T02:42:47+00:00

My view model has a property who’s value updates one data-bound element but not

  • 0

My view model has a property who’s value updates one data-bound element but not another for some reason.

When signUpModel.fullNameActive value changes via the blur and focus events on the input the following:

<span data-bind="text: signUpModel.fullNameActive"></span>  

is updated, but the following:

<p class="inputTip" data-bind='visible: signUpModel.fullNameActive'>
  Enter your first and last name
</p>

is not. Why is that?

Also, when I initially open the page, the non-working element shows, then hides and then shows. As if it’s been changed 3 times.

var signUpModel = new SignUpModel();

    $(document).ready(function () {
        ko.applyBindings(signUpModel);
    });

    function SignUpModel() {        
        this.userID = ko.observable("");
        this.userName = ko.observable("");

        this.fullName = ko.observable("");
        this.fullNameActive = ko.observable(false);

        this.sex = ko.observable("");
        this.dateOfBirth = ko.observable("");
        this.emailAddress = ko.observable("");
        this.profileImage = ko.observable("");
        this.levelID = 1;       
    }

With this view code:

<div class="fieldContainer">
    <span data-bind="text: signUpModel.fullNameActive"></span>           
    <input type="text" data-bind="event: {blur: function(){signUpModel.fullNameActive(true)}, focus: function(){signUpModel.fullNameActive(false)} }, value: signUpModel.fullName, valueUpdate: 'afterkeydown'" maxlength="40" id="inputFullName" />
    <div class="inputHelp">
        <p class="inputTip" data-bind='visible: signUpModel.fullNameActive'>
            Enter your first and last name</p>
        <p class="isRequired" data-bind='fadeVisible: signUpModel.fullName().length < 1 || signUpModel.fullName().replace(/\s/g,"") == ""'>
            Gotta enter something</p>
        <p class="isGood" data-bind='fadeVisible: signUpModel.fullName().length > 1 && signUpModel.fullName().replace(/\s/g,"") != ""'>
            This is exciting <span id="personsName" data-bind="text: signUpModel.fullName"></span>
        </p>
    </div>
</div>
  • 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-05-24T02:42:47+00:00Added an answer on May 24, 2026 at 2:42 am

    I suspect that the flashing has something to do with the fadeVisible binding that you are using.

    Something like this would be a simple implementation:

    ko.bindingHandlers.fadeVisible = {
        init: function(element, valueAccessor) {
            $(element).toggle(ko.utils.unwrapObservable(valueAccessor()));
    
        },
        update: function(element, valueAccessor) {
            ko.utils.unwrapObservable(valueAccessor()) ? $(element).fadeIn() : $(element).fadeOut();
        }
    

    Try to reconcile yours with this fiddle: http://jsfiddle.net/rniemeyer/f3XMN/

    Both elements appear to be updated properly based on the value of fullNameActive.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a view model that has a property that looks like this Property
My view model defines property which has to be displayed as combo box. Property
I have a WPF ComboBox which has its IsEditable property bound to a view
My view model has the property: public IEnumerable<string> Names { get; set; } My
My view model MyViewModel has a property MyProperty that i need to read/save from/to
i have a strongly typed asp.net-mvc view and the Model has a . Links
In my view model if have a: List<Car> where car has an Id and
My view page has a Model which is represented by a List of Students.
I have senario in which one view and view has binding with multiple ViewModel.
My model has a property of output and my form has a TextBox named

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.