Skip to main content

Questions tagged [knockout.js]

Knockout.js is an open source JavaScript library for dynamic HTML UIs using the Model-View-View Model (MVVM) pattern.

0 votes
0 answers
27 views

Bind CSS with knockout Secure Bindings

How Can I bind CSS to a div using knock out secure bindings. The following piece of code is not working. data-sbind="css:{'has-error': isNullOrWhiteSpace($root.UserID()) == true,'MandatoryFields':...
shu's user avatar
  • 1,958
0 votes
0 answers
56 views

How to re-render dropdown with search text data filtered

I am using a bootstrap selectpicker with knockout.js binding which has multiselect as well as data-live-search properties on. Here is a scenario Steps: Open dropdown, type ‘cat’ in dropdown Due to ...
Keren Caelen's user avatar
  • 1,466
0 votes
0 answers
26 views

Form validation is not working using Knockout.js SPA

I have created a Single Page Application in which create three HTML Pages names: 1. Index.html (Master Page), 2. Home.html, and 3. Contact.html and also two JavaScript Pages: 1. Index.js (for Master ...
MANISH SHARMA's user avatar
0 votes
1 answer
32 views

Conditional html heading tag based on variable in knockout.js

Is it possible to set the html element in knockout.js programmatically? For example, the user can choose the heading level (from h1 - h6 and p if it's no heading). And in frontend I then have a ...
Alex Berger's user avatar
  • 1,608
0 votes
0 answers
31 views

Cast a string name to model name which already exists in knockout JS

I am working on a dynamic validation setting in Knockout JS. I blocked by one scenario, I am getting viewmodel name as string from db with control id. This model name is a string name like “testModel....
Remya's user avatar
  • 103
0 votes
0 answers
62 views

magento 2.4.6 knockout.js:3753 Uncaught TypeError: Unable to process binding "visible: function(){return isVisible() }"

in magento 2.4.6 getting bellow error. i can not found solution so if anyone can help me then it will be great. knockout.js:3753 Uncaught TypeError: Unable to process binding "visible: function(){...
mike cole's user avatar
0 votes
0 answers
47 views

Force Magento 2's checkout accordion to be open on first step, closed on second step

This is my Magento_Checkout/web/template/summary/cart-items.html <!-- /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ --> <div class="...
D.D.'s user avatar
  • 111
0 votes
1 answer
32 views

Unable to process binding "value: function() {return myVar }"

I am using knockout.js and am trying to get a <select> tag to populate with options from on of the view model's properties. I think I did everything right but it breaks. The console error is ...
drethedevjs's user avatar
0 votes
0 answers
14 views

I am getting Failed to load resource: the server responded with a status of 500 (Internal Server Error) - intermittently in Knocout/MVC app

Getting intermittent 500 internal server error while laoding page. Client Side code to load Dropdown on Page whenever error occoured it is not hitting server side controller. // Perform initial ...
user23605580's user avatar
0 votes
0 answers
21 views

Knockout Computed field never updates UI

I have some computed fields that I setup as get the model from JSon. The event is triggered on the related fields change and the calculation is correct but the value is never presented on the UI. ...
Sergio Sarabando's user avatar
1 vote
0 answers
31 views

Add values in form input in Javascript (Chrome)

I am trying to learn how to automate the input values in some forms when they get repetitive (asking for age, gender, location). I have investigated the HTML and noticed there are also a few hidden ...
Datacrawler's user avatar
  • 2,856
0 votes
0 answers
32 views

Magento 2: wrong shipping method saved in order

We have 2 delivery methods enabled on Magento 2.4.6: home delivery and a custom store pickup. If the home delivery method is selected and correctly saved in the order, the customer's address is ...
Fano Avotiana's user avatar
1 vote
0 answers
31 views

How to add multiple method titles to KnockoutJS ifnot statement in Magento2

I am looking to add multiple shipping method titles to some knockout JS ifnot statement in Magento2. I currently have the following code which works for the method title listed. <!-- ko ifnot: ...
user86226's user avatar
-2 votes
1 answer
88 views

Uncaught TypeError error in Chrome for multiple file upload

On one of the pages I allow user to upload multiple images to upload. Script works fine in Firefox however for sometime it doesn't work on chrome as it give following error Uncaught TypeError: Cannot ...
Learning's user avatar
  • 19.8k
2 votes
1 answer
233 views

Apexcharts <svg> attribute height: Expected length, "NaN" when loading other page

I have a simple chart generated with ApexCharts v3.45.1. This is on a single page application where when I fetch another page via an AJAX call, the original chart in the DOM is removed on purpose (...
Jack's user avatar
  • 33
0 votes
2 answers
96 views

Is toString() JavaScript output "guaranteed" to be the same in every browser/implementation?

I'm using a specific framework and somewhere in my code I have a function as a parameter. I want to check if that function is a specific anonymous function out of that framework. I don't have access ...
Dirk Boer's user avatar
  • 8,923
0 votes
0 answers
26 views

How does the knockout rendering for imagepicker work in SurveyJS Survey Creator

Can someone help me understand how imagepicker is rendered in knockout SurveyJS Survey Creator? I am not sure where or how the binding to the elements in the html template occurs or how the html ...
Alex's user avatar
  • 1
0 votes
1 answer
41 views

Knockout.js - Subscription to observable selected value in cascading select list firing twice

I have two templates for cascading select lists implemented with Knockout.Js, named office and department. Each of the lists has a subscription to the selected Value. There are two ways the list and ...
nebula's user avatar
  • 93
6 votes
2 answers
2k views

Malware in Knockoutjs context debugger

Has anyone else seen this: Is there another extension for KnockoutJs?
wmmhihaa's user avatar
  • 921
0 votes
1 answer
276 views

Magento 2 Minicart / Knockout.js: Format calculated price / sum

In Magento 2 minicart (CE 2.4.6) I do not only want to show the price of each item in cart, but also the SUM of each item (if there is more than one unit of the same item in cart). I have therefore ...
ralex's user avatar
  • 97
0 votes
0 answers
225 views

Magento 2: How to open a modal for each related product using UI component?

I need to save product IDs(will be used ono the frontend later) into the extension attribute of the related product. Idea is that modal with products listing should appear when I click the 'Select ...
dev's user avatar
  • 23
0 votes
1 answer
34 views

knockout save reordering with jQuery SortableJS when drag/drop rearrange list in

I have a knockout application, where I have a list of divs for a knockoutobservablearray. After I move an item to a new position. How do I update the knockoutobservablearray to reflect the changed ...
user1561196's user avatar
0 votes
0 answers
32 views

Knockout JS blur event binding occurs 2 times

I have this simple input <div class="input-group" data-bind="attr:{id: 'date-rec-datepicker-calendar-' + invoiceId()}, liveEditor: value"> <input class="edit form-...
Foreastbtch's user avatar
0 votes
0 answers
34 views

Can't stop multiple page (html) from overlapping divs using @media print css

I've got a two-column, multi-page, data fed, phone directory. The screen layout works fine and the printing did until a recent update to DNN. I can't blame DNN because it might be browser related, but ...
user3157885's user avatar
0 votes
0 answers
16 views

How can I do a Unit Testing in KnockoutJS with QUnit

I have this ViewModel (short) with KnockoutJS and I need to make a Unit Test using QUnit but I have this error message when i running my test. ViewModel: var modeloContratacion;//NOSONAR define(['...
Ricardo Uriel Leon Niño's user avatar
0 votes
0 answers
91 views

Weird onchange event in Chrome with autofill fields and Stripe embed

We have a weird issue happening in Chrome autofill where if I autofill the forms in the video link it causes an onchange event on my Type dropdown that is using knockout.js and sends an undefined ...
Mike Flynn's user avatar
  • 24.1k
0 votes
1 answer
33 views

Using the last image in an array

Sorry if wrong format or dumb question, I'm new to this. I use knockout js and normally use it to find a image with an index and display it, however, I'm wondering if it is possible to ensure it is ...
2ndLineDan's user avatar
0 votes
1 answer
56 views

Check string in Knockout JS and then split string values

I have the following data binding: $row().current_tracking Sometimes $row().current_tracking has a value of, for example: 372424561624 And sometimes $row().current_tracking have a value with two ...
Aknot's user avatar
  • 509
0 votes
0 answers
76 views

Knockout extenders

I have the following extender below and I am trying to use it in typescript and I'm getting the error listed. I have searched through so alot of documentation and this seems to be the way it should be ...
Panagiotis Fatouros's user avatar
0 votes
0 answers
70 views

Knockout with Monaco - Close Modal Not Updating

I have a page that has a monaco editor textbox. I have an Edit button that, on clicked, opens a modal window with a new monaco textbox (it gets initialized with the value from the model bound to first ...
Will Comeaux's user avatar

15 30 50 per page
1
2 3 4 5
676