Questions tagged [knockout-binding-handlers]
22 questions
3
votes
0 answers
Update chosen-select knockout binding whenever changes are made to another knockout binding
I have the following scenario:
I have a table with to multiple select input boxes (chosen.jquery).
2
votes
2 answers
Knockout Google Map: Component vs. Custom Binding Handler
When I google "Knockout Google Maps" I find quite some KO-based Google Maps implementations. All of which I was able to find take the approach to use a custom binding handler whereas I originally intended to implement it as a Knockout…

connexo
- 53,704
- 14
- 91
- 128
1
vote
1 answer
data-bind foreach for an observable number
I am trying to display stars for each item in a list
I have an interface that has the 5-star score on a video, how do I do a foreach for the count of that score? rather than creating an array for the score?
interface Video{
Score:…

P.Bergin
- 13
- 2
1
vote
1 answer
Create HTML based on number in array
first time using KO, apologies for what may sound like a silly question.
I have an array full of data. One value is 'stars', which is a number. In my HTML, I would like to create HTML elements based on that value. For example, if the value is four,…
user8516249
1
vote
1 answer
Knockout JS: Computed observable failing to update
I am having trouble getting my knockout text observable to update with a computed or pureComputed ko function.
var vm =…

SENA
- 13
- 2
1
vote
2 answers
Format phone number as you type (xxx) xxx - xxxx
I am writing a custom bindingHandler in knockout to format the (US) phone numbers in the following format as they type it.
(xxx) xxx - xxxx
HTML code...
And binding handler...
…

smr5
- 2,593
- 6
- 39
- 66
1
vote
1 answer
knockout optionsText / optionsValue bindings won't work
Why does this binding fail with a "value not found" exception?
The options array's data is this:
ko.observableArray ([
{key: 'foo', value: '1'},
{key:…

Justin Grant
- 44,807
- 15
- 124
- 208
0
votes
1 answer
Why did changing this formatting function in this way, cause the Knockout binding to start working?
I have an element on a page, like this:
And the function that calculates it I first wrote like this:
self.FormattedCountOfPeople = ko.computed(function () {
…

Caius Jard
- 72,509
- 5
- 49
- 80
0
votes
2 answers
knockout toggle/expand the text on click of text
Binding data into html table using knockout. One of the column has large text 200 length.. and UI just got scroll long. So just want to show, first 20 length chars and click of, ... it should expand or collapse the text.
so just created a template…

dsi
- 3,199
- 12
- 59
- 102
0
votes
1 answer
How can I disable/enable a drop down embedded in a table mapped to a knockout observable array
I'd like to disable/enable a drop down embedded in a table in a form until a particular value is selected in the predecessor drop down.
Here's what I tried that doesn't seem to work:

Suraj Nair
- 561
- 1
- 8
- 27
0
votes
1 answer
How to refresh the list in KnockoutJs after it is loaded first time?
I am displaying data list as shown below:
//render data raw here...
I am new to ko and looking to refresh this list without reloading the page, is this something possible with…

upatel
- 3
- 3
0
votes
2 answers
Symfony Knockout: Custom Binding Handler cannot listen to the binding handler
On my symfony 3 project I made a form that I want to submit via ajax using knockout.js. But for some it makes the browser to redirect into the action instead of doing via ajax.
The form that I want to submit with ajax on a file named…

Dimitrios Desyllas
- 9,082
- 15
- 74
- 164
0
votes
1 answer
Passing an unknown function in a knockout binding (foreach) - is it possible?
For a simple example, lets say this is my repeater:

naspinski
- 34,020
- 36
- 111
- 167
0
votes
1 answer
How can a Knockout binding be applied to the element?
I would like to dynamically set the font-size on the root element using a custom Knockout bindinghandler which does a calculation based on the width of the browser window.
When I tried to apply the binding, nothing seemed to happen, so I tried to…

connexo
- 53,704
- 14
- 91
- 128
0
votes
1 answer
KnockoutClassBindingProvider: How to perform a foreach binding
I see the basic example on github but I can't get it to work with my code. I should add that I'm using durandal.
How do I get the bindings to work? Am I doing anything wrong?
Input.js
define(['knockout'], function (ko) {
var ctor = function…

christo8989
- 6,442
- 5
- 37
- 43