Expand my Community achievements bar.

Problem creating script object

Avatar

Former Community Member
I´m very new at LiveCycle and I haven´t been able to create a function to accomplish a very simple thing because I guess I´m missing something.

What I want to do is to call a function in the mouseup event that just sets the rawValue of a Text Field to my name.



I have the following:



---- form1.#variables[0].rawval - (JavaScript, client) ---

function setname(field){

field.rawValue = "Jose";

}



----- form1.TextField1::mouseUp - (JavaScript, client)



xfa.form.form1.variables.rawval.setraw(this);



I don´t know why nothing is working when referencing the field. Is this incorrect?



Thanks
1 Reply

Avatar

Level 6
You're calling "setraw", but the function is called "setname". Try just rawval.setname(this);