How to get and set complete list and string in JS to the applet?

Math123 shared this question 1 year ago
Answered

list = {1, "2" , "Computer"}

getListValue/setListValue only working in integer value for one index.

How to get complete list with strings and set change using JS to different values and display to the Applet e.g: list2

list2 = {"Hello", 3, "5"}

Best Answer
photo

I don't know why you do this to yourself:

Instead of learning GGB perfectly, you want to play around with GGB-JS.

Only to find in the end that it does not have enough use.

But your time and your problem.

Note1: I do not intend to explain the syntax and commands of JS to you. You can find this on the Internet.

Note2: I do not intend to find your bugs in JS.

Note3: The example in the attachment only runs with GGB5.0

Comments (5)

photo
1

GG wants same type for all elements in a list

photo
1

hello mathmagic,

Pls if possible share an attachment with JS so i can see example with stings list and intergers list.

photo
photo
2

I don't know why you do this to yourself:

Instead of learning GGB perfectly, you want to play around with GGB-JS.

Only to find in the end that it does not have enough use.

But your time and your problem.

Note1: I do not intend to explain the syntax and commands of JS to you. You can find this on the Internet.

Note2: I do not intend to find your bugs in JS.

Note3: The example in the attachment only runs with GGB5.0

photo
1

Thanks rami,

I understand your JS code completely. I just did not understand the technique to get the list items and manipulate using JS and get back to the applet.

Without any doubt GGB is superb software.

By the way your experience gave me a lot of learning Thanks...

photo
photo
1

a mi me funciona en ver6 salvo que no espera en las alertas sucesivas y solo se ve la ultima alerta, pero los elementos de la lista son correctamente leidos

gracias RAMI por tus anotaciones

© 2021 International GeoGebra Institute