Pasar una variable a script de Js | Pass a variable to Js script - Forum

Forum Navigation
You need to log in to create posts and topics.

Pasar una variable a script de Js | Pass a variable to Js script

ESPAÑOL

@luishp, @vadim,@asleycruz

Descubri esta funcion para capitalizar,  y arme el bloque de javascript pero no me doy cuenta como le paso la frase que quiero capitalizar para que tome

la variable (frase) del script y luego como tomar el resultado capitalizado para tenerlo en una varialbe de visual neo web

Alguna Idea?

BeginJS
function capitalizarPrimeraLetra(frase) {
frase = frase.split(' ');
for(let i=0; i < frase.length; ++i) {
frase[i] = frase[i][0].toUpperCase() + frase[i].substring(1);
}

return frase.join(' ');
}
EndJS

ENGLISH

I discovered this function to capitalize, and I put together the javascript block but I don't realize how I pass the phrase that I want to capitalize to it so that it takes

the variable (phrase) of the script and then how to take the capitalized result to have it in a visual neo web varialbe

Any ideas?

 

BeginJS
function capitalizarPrimeraLetra(frase) {
frase = frase.split(' ');
for(let i=0; i < frase.length; ++i) {
frase[i] = frase[i][0].toUpperCase() + frase[i].substring(1);
}

return frase.join(' ');
}
EndJS

@gaev,

Use '$App.yourvariable' inside the javascript block to refer any neoscript variable. eg '$App.phrase' if your neoscript variable is [phrase].

Best regards

luishp, Vadim and noyzen have reacted to this post.
luishpVadimnoyzen

Thanks!!!!!!

roccocogliano has reacted to this post.
roccocogliano