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 7936003
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T22:04:59+00:00 2026-06-03T22:04:59+00:00

I change places function so that the caller is before called, an error occurs.

  • 0

I change places function so that the caller is before called, an error occurs.

What can say this character? Maybe somewhere in the distance of a kilometer bracket is not closed?

UPD: For example, its code work correctly if I place first string at end:

SCRIPT5022: Pass a function that returns the value of the dependentObservable
knockout-2.0.0.debug.js, line 1054 character 9

osagoViewModel.fields.yearsBoxes = new field("Years", yearsBoxesFunc, null, osagoViewModel);


function yearsBox() {
    this.year = new field("Years", function () { return ["1 year", "2 years", "3 years", "4 years", "5 years", "6 years", "7 years", "8 years", "9 years", "10 years"]; }, null, osagoViewModel);
}


var yearsBoxesFunc = function () {
    var yearsBoxCount = osagoViewModel.fields.driversCount.selectedValue();

    var retArrFunc = function (count) {
        var arr = [];
        for (var i = 0; i < count; i++) {
            arr.push(new yearsBox());
        }
        return arr;
    };


    switch (yearsBoxCount) {
        case "many":
            return retArrFunc(0);
        case "1":
            return retArrFunc(1);
        case "2":
            return retArrFunc(2);
        case "3":
            return retArrFunc(3);
        case "4":
            return retArrFunc(4);
        case "5":
            return retArrFunc(5);
    }
}
  • 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-03T22:05:00+00:00Added an answer on June 3, 2026 at 10:05 pm

    Open your console and let it halt on errors. In the stacktrace you will see where you called the knockout.js-function without a function as an argument.

    To read about parsing of functions and their availability in the current scope, read What is the difference between a function expression vs declaration in JavaScript? and/or var functionName = function() {} vs function functionName() {}.

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

Sidebar

Related Questions

I find myself writing code that looks something like this: $(document).ready(function(){ updateStuff(); $('select').change(function(){ updateStuff();
I'm working on a javascript function that when called will make a ajax request
I often need to make a core function that's used in many places somehow
#import UIImageView+AFNetworking.h When i scroll in my table. The cells change places. It's like
The only place I can think to change is the version in my Target
change() function works and detects changes on form elements, but is there a way
Change all links that have an image in it to: javascript(alert(thehref)); eg. <a href=/galleries/anna-leah-111827/image01.html><img
jquery change function on dropdown is not working at my application and working at
I change some methods from $(selector).live('click', function(){}); to $(selector).on('click', function(){}); . At first it
I'm implementing a function called attach. I'm looking for a way to take a

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.