Garima Bansal

Garima Bansal

  • 1k
  • 648
  • 36k

Enable textbox when another textbox populated

May 28 2024 10:55 AM

I have two textboxes if i insert a value in Landscaping, then Compound Walling gets disabled

<div class="col-md-2"> Enter Value for Landscaping
                                    Html.TextBoxFor(model => model.landscapingsqm, htmlAttributes: new { id = "landscape", class = "form-control", onchange = "onchangeland()" })
                                    Html.ValidationMessageFor(model => model.landscapingsqm, "", new { class = "text-danger" })
                                </div>

<div class="col-md-2"> Enter Value for Compound Walling
                                    Html.TextBoxFor(model => model.compoundwalling, htmlAttributes: new { id = "compoundwall", class = "form-control", onchange = "onchangecompoundwalling()" })
                                    Html.ValidationMessageFor(model => model.compoundwalling, "", new { class = "text-danger" })
                                </div>

 

 


Answers (4)