ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
Change awe textbox value with js on dropdown change
Title:
B
I
{code}
?
I use the `change` event of a dropdown to update the value of a numeric TextBox @Html.Awe().TextBoxFor(o => o.AgentCommissionBaseRate).Numeric(); $.ajax({ type: "GET", url: '...'.val(), success: function (data) { $('#AgentCommissionBaseRate').val(data); } }); The problem is that the displayed value of the field doesn't change until I click on the field. Only then does the value appear. Is there a specific mechanism to update the value of the field from jQuery?
Save Changes
Cancel
Mathieu Savage
asked at 26 Jul 2019
I've updated my answer
at 09 Aug 2019
Omu
Answers
B
I
{code}
?
you can either do this $('#txtid').val(data).change() or $('#txtid').val(data).data('api').render()
Save Changes
Cancel
Omu
answered at 26 Jul 2019
please
Sign In
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our
cookie policy
and
privacy policy
.
OK