Skip to main content

All Questions

0 votes
2 answers
122 views

How to display images and text using knockout?

I'm learning more about knockout.js. I want to add images to my text data, and display the correct one based on the image link provided in the array with it's matching data. I only want one set to ...
CodingSkeletons's user avatar
0 votes
1 answer
419 views

What is the purpose of getTemplate() in knockout Js Magento 2?

I'm learning Knockout JS in Magento 2. There is a function getTemplate() which syntax looks like this . I want to know its working and purpose. FilePath: app/code/CloudyDigitals/LearnKnockout/view/...
Sufyan Akhter's user avatar
0 votes
2 answers
506 views

Knockout js - validate if value is not empty or different to 0 to display text in data-bind

I have 2 attributes precio_anterior and precio_suscriptor, and i do not know how validate with data-binding if precio_anterior is not empty or different to 0 to display precio_anterior text, but if it ...
Diego Castro's user avatar
0 votes
1 answer
171 views

Knockout binding text in button with icon

In my HTML page I need to include a button element with a description and an icon (I use an icon from the fontawesome.com library). To compile the data in my page I use the Knockout Javascript ...
filippocurati's user avatar
0 votes
1 answer
21 views

How to do multiple bind in KnocckOut Js

I am trying to display the paper clip icon based on condition (Either it should be pop or non pop or both ) which is working fine , but i want to color the paper clip icor based on one more condition ...
sahana i.s's user avatar
0 votes
1 answer
207 views

knockout.js can you access the binding context from a script?

I have a javascript object graph, an HTML form, and knockout bindings connecting the two. The form is complex, and sometimes the form needs to add some computed observables to some sub-object in our ...
Gunther Schadow's user avatar
0 votes
1 answer
288 views

knockout and applyBindings - how to control the scope?

I am new to knockout, so going to fire a lot of questions. But I'm not new to data binding. So I am knocking my head on the difference between my expectations and reality. Here is a very basic ...
Gunther Schadow's user avatar
1 vote
2 answers
285 views

knockout write binding without observable

In knockout, say we have something like this: var person = { name: "The H. Dude", telecom: [ "mailto:[email protected]", "tel:+1-987-654-3210" ] } and I have a ...
Gunther Schadow's user avatar
0 votes
1 answer
56 views

Knock out Observable binding issue on HTML

I have created two observables variables on Knock Out as follow: self.winImage1= ko.observable(); self.winImage2= ko.observable(); And validated and stored platform based CSS for the observable ...
Manikandan's user avatar
0 votes
1 answer
587 views

Binding Ajax Response Issue "You cannot apply bindings multiple times to the same element." in knockoutJs Magento2.4.3

I am calling ajax inside knockoutJs and want to binding data inside html file on checkout page. How could i achieve this. Please help me. define( [ 'jquery', 'ko', 'uiComponent' ], ...
Shilpi Varshney's user avatar
0 votes
3 answers
3k views

Get checked value from radio button group

I am populating radio buttons dynamically, and on submit button click I need to get value of the checked radio button from the group. <ul data-bind="foreach: Numbers"> <li&...
Techno's user avatar
  • 170
1 vote
1 answer
93 views

using knockout and durandal js foreach binding to duplicate section, but all the duplicates are taking same values when editing

i'm new to using the durandal Js foreach binding, i wanted to show the same fieldset multiple times according to the number of values in a selectlist and when i add an element to this list a new ...
NexNex's user avatar
  • 21
0 votes
1 answer
184 views

KnockoutJs link only opens if i open on a new tab

I have a databinding below, which I can successfully right click and open on a new tab. But a normal click does not actually open that link. Anyone knows what I could be missing or doing wrong here? I ...
Wella's user avatar
  • 32
0 votes
0 answers
533 views

form submit event listener not working on pages with data-binding

In my JavaScript code there is a form submit event listener added as follows: form = document.querySelector('form'); form.addEventListener("submit", eventHandler, false); function ...
tungstenmx's user avatar
0 votes
1 answer
38 views

Why are the replaced values in ko.ObservableArray not updating my view?

I'm trying to make an overview page for a simple webshop. The client can go to the next page, but this will not reload the whole document, it just triggers a fetch for the next set of products. I'm ...
Typhaon's user avatar
  • 1,004

15 30 50 per page
1
2 3 4 5
41