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 ?

David Esperalta

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.


Consider to purchase one or more licenses of our products: press here!

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