Premetto che sono alle prime armi di javascript, sto' cercando di modificare una funzione gia' esistente.
Ho necessita' che premendo un bottone, si passi il valore di una textarea ad una funzione che ne modifica il valore, riaggiornando il valore dellatextarea stessa.
Grazie per la collaborazione
ciao
codice:
this.btnList = {
....
"pulisciword": ['PulisciWord', 'PulisciWord', 'editor_action(this.id)', 'ed_link.gif'],
....
function editor_action(button_id) {
...
// insert link
if (cmdID.toLowerCase() == 'pulisciword'){
editdoc == wordClean(editdoc);
}
end function
function wordClean(wordData) {
// make one line
wordData = wordData.replace(/\r\n/g, ' ');
return wordData;
}
Il problema e' proprio come chiamare e riprendere il valore di wordClean