Are you first timer at lazacode.org? Why not join us and start exchange your knowledge with everyone. Register today!

jQuery - condition for 1 string used by 2 ids

0 votes
1 view
added Feb 9 in jQuery by LC Marshal Second Warrant Officer (3,400 points)

HTML

<div class="landed">
  <input id="built_up" name="" type="text">
</div>

<div class="non-landed">
  <input id="built_up_nl" name="" type="text">
</div>

 

JS

submitUrl += "&sub_type="+sub_type;
submitUrl += "&block="+block;
submitUrl += "&level="+level;
if (property_type == 'l'){
  submitUrl += "&built_up="+built_up;
}
else {
  submitUrl += "&built_up="+built_up_nl;

submitUrl += "&land_area="+land_area;
submitUrl += "&name="+name;
submitUrl += "&email="+email;
submitUrl += "&contact="+contact;
submitUrl += "&state="+ select_state;

   

Please log in or register to response this solution.

...