Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

161
Views
¿Cómo devolver el valor de la variable al js?

Quiero devolver el valor del elemento P221_JSON_PROCESS a la variable y luego devolver el valor al new vis.DataSet . Intenté de la siguiente manera:

// P221_JSON_PROCESS contiene - { id: 1, label: "Node 1" },

 function returnNodes() { var process = document.getElementById("P221_JSON_PROCESS").value; return process; } var nodes = new vis.DataSet([ returnNodes(); ]); // create an array with edges var edges = new vis.DataSet([ ]); // create a network var container = document.getElementById("mynetwork"); var data = { nodes: nodes, edges: edges, }; var options = {}; var network = new vis.Network(container, data, options);

¡Gracias por adelantado!

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Puede usar el método de agregar como

 var nodes = edges.add([returnNodes()]);

o

 var nodes = new vis.DataSet([,returnNodes()]);
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!