Autofill text fields depending on dropbox value in Rails

Hi…I want to make some of my text fields to auto fill with zero(0),
when the user selects NA in dropdown… How can I achieve that? Is there
any rails way to do that??

I have seen lot of jquery to accomplish auto fill values… I am new to
rails as well as am zero at jquery… That is why I am looking for a
rails way to do that.

Kindly please someone help me.

On 24 March 2016 at 09:05, Poombavai S. [email protected]
wrote:

Hi…I want to make some of my text fields to auto fill with zero(0),
when the user selects NA in dropdown… How can I achieve that? Is there
any rails way to do that??

I have seen lot of jquery to accomplish auto fill values… I am new to
rails as well as am zero at jquery… That is why I am looking for a
rails way to do that.

jQuery is the way to do it. I suggest starting by finding some
tutorials, probably best to start off with basic javascript.
Scripting in the browser is not trivial however, be prepared to spend
some time learning the basics.

Colin

Colin L. wrote in post #1182423:

On 24 March 2016 at 09:05, Poombavai S. [email protected]
wrote:

Hi…I want to make some of my text fields to auto fill with zero(0),
when the user selects NA in dropdown… How can I achieve that? Is there
any rails way to do that??

I have seen lot of jquery to accomplish auto fill values… I am new to
rails as well as am zero at jquery… That is why I am looking for a
rails way to do that.

jQuery is the way to do it. I suggest starting by finding some
tutorials, probably best to start off with basic javascript.
Scripting in the browser is not trivial however, be prepared to spend
some time learning the basics.

Colin

Thankyou Colin… I will start to learn javascript… Thankyou for your
response…