Setting Values using Javascript


John Clarke
I just want to confirm something. If I wish to set a value of an input box with the name Input1 I presume that I use the following Javascript : document.getElementById("Input1").value = "Testing 1,2,3"; Is there another way to do this ? I presume that I use a similar approach to accessing the methods of the objects being used too. Is that correct ?

DecSoft

Hello John,

If we are talking about an AB input control, then we probably want to use their value variable:

Your code can work also with AB controls (or an HTML input control that you place inside an HTML control) but if we are talking about AB controls you probably want to use the control's variables.


Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.

This website uses some useful cookies to store your preferences.

I agree. Hide this note. Give me more information.