Changeset 2b0a4db for src/main/resources/static/js
- Timestamp:
- 02/08/23 20:42:53 (22 months ago)
- Branches:
- master
- Children:
- 46fd0c7
- Parents:
- a436340
- Location:
- src/main/resources/static/js
- Files:
-
- 2 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/resources/static/js/register_business.js
ra436340 r2b0a4db 9 9 10 10 $.each(data, function(index, obj) { 11 $el.append($("<option></option>") 12 .attr("value", obj.value).text(obj.text)); 11 $el.append("<option value=" + obj.value + ">" + obj.text + "</option>"); 13 12 }); 14 13 }); … … 16 15 $("#companyType").change(function() { 17 16 var selectedVal = $(this).find(':selected').val(); 18 var selectedText = $(this).find(':selected').text();19 17 alert(JSON.stringify(enumerations[selectedVal-1])); 18 var selectedObj = enumerations[selectedVal-1]; 19 var $el = $("#predefined_services"); 20 $el.empty(); 21 $.each(selectedObj['serviceTypes'], function (index, obj) { 22 $el.append( 23 '<div class="form-check">\n' + 24 ' <input class="form-check-input" type="checkbox" value=\"' + obj.id + '\" id=\"'+ obj.id +'\">\n' + 25 ' <label class="form-check-label" for=\"' + obj.id + '\">\n' + 26 obj.name + 27 ' </label>\n' + 28 ' </div>') 29 }); 20 30 }) 21 31 }); 22 23 document.addEventListener('DOMContentLoaded', e => {24 $('#input-prefetch').autocomplete()25 }, false);
Note:
See TracChangeset
for help on using the changeset viewer.