Questions tagged [jsobject]

JSObject is a class of the Java UI library JavaFX. The class is used to manipulate Javascript objects from Java code.

JSObject is a class of the Java UI library JavaFX. The class is used to manipulate Javascript objects from Java code.

101 questions
0
votes
1 answer

Javascript object syntax that I can't recognize

I have this code snipet: proxy('http://my-custom-api-endpoint.com', { proxyReqOptDecorator(options) { options.headers['x-forwarded-host'] = 'localhost:3000' return options } }) It is a call to a function named proxy, the first argument…
Alejo Dev
  • 2,290
  • 4
  • 29
  • 45
0
votes
1 answer

In mongoose.js, can we search for a model with several search parameters?

Im using the module mongoose.js for my mongodb database. My data base looks like this: { thing1: "thing1", thing2: "thing2" } And I want to search a model with several parameters (thing1 and thing2). I tried this: myModel.findOne({ thing1:…
Zitta
  • 74
  • 7
0
votes
1 answer

SWUP JS external function call

this is my first time using swup js with the js plugin. https://swup.js.org/plugins/js-plugin I can see that the trigger to go to the clicked page lies inside the object array of options. My question is there anyway I can trigger the "next" from…
0
votes
1 answer

Java 11 + netscape JSObject

I have an old project I am migrating from Java 8 to Java 11. When compiling the project I use these VM options: --module-path /path/to/javafx-sdk-11.0.2/lib…
victor.alm
  • 480
  • 1
  • 7
  • 16
0
votes
2 answers

I have a problem with 'window.js_obj' in brython

I'm currently facing a problem with window.js_obj I have a JSObject obtain through an API and jQuery but when I try to convert the gotten JSObject into a proper Python Dict, it seems like there is no module called js_obj into window. Here is what I…
0
votes
2 answers

Prototype Concept in JavaScript

I have some questions related to prototypes. If we have created one object say Dog through the help of Person function constructor. Say Person has 2 properties on each instance member. var Dog = function (name,color){ this.name = name, …
0
votes
1 answer

how to convert prototype array to a json string

I have my js object/array [Containerbox-1: Array(2) 0: "textbox-3" 1: "rediobox-4" length: 2 __proto__: Array(0) length: 0 __proto__: Array(0)] Who to convert this in to a string I have used the JSON.stringify(); but i get only [] I am not sure…
Parag Chaure
  • 2,883
  • 2
  • 19
  • 27
0
votes
3 answers

How to loop over json data and merge rows with the same state id?

I have .json file of us-senat that has two senators for each state. I would like to loop over this json file and create new JS object that should have state id as a key and then set two properties for each key name1 and name2. Here is example of how…
espresso_coffee
  • 5,980
  • 11
  • 83
  • 193
0
votes
3 answers

"TypeError: s.sum is not a function" an attempt to count sum property values of javascript object

I have an js object JSON var s = [ { "MONTH":" 2018-01", "DEPARTMENT":"Legals", "EMPLOYEE":"Smith A.", "AMOUNT":"14289.66" }, { "MONTH":" 2018-01", "DEPARTMENT":"Legals", "EMPLOYEE":"Jonson…
dmytro Minz
  • 407
  • 1
  • 8
  • 19
0
votes
1 answer

JavaScript Objects values updates by IF Statements

I have problem with JavaScript Objects values updates by IF Statements. it is showing error in middle of the code. please suggest. if you need more info please look at the bottom for more info about the project. ​var collection = { "2548":…
Suren
  • 1
0
votes
1 answer

GTM API Call Tabulator

Hello I'm trying to use data from google tag manager in tabulator. I've got the objects pulling in and can validate that by looking in console but I don't know how to bring them in to tabulator like I normally would with an Ajax call. Anyone know…
0
votes
1 answer

Confusion between a general global variable and object as a variable in javaScript

Below is my code. When I'm calling myDate variable outside of myTime() function to create a Date() object, the setInterval() function don't fire but when it's inside myTime() function. As I know myDate variable is a global variable and it should…
0
votes
1 answer

(JavaFX WebEngine) JavaScript-to-Java Calls Work Inconsistently

Good day, I am having issues with my app's custom minimize and close buttons working inconsistently. I would like to fix this before advancing this project and making it more complicated. Background The app is an undecorated JavaFX stage that…
lycosis
  • 131
  • 2
  • 12
0
votes
1 answer

How to pass 'window' JSObject from one browser to another?

With JavaFx WebView, I can get the 'window' of a browser instance[1] with: // Java code netscape.javascript.JSObject win = (JSObject) webengine.executeScript("window"); Then I can pass this JSObject to another browser instance[2], and in this…
JoseHeitor
  • 61
  • 1
  • 7
0
votes
2 answers

How to use prompt input to loop through an array of objects and display a property

First thank you in advance for any responses to this problem I am having. I am new to JS and feel that this code should be pretty straight forward, but it is not working as intended. I want to search through these objects in the array by name, and…