xxxxxxxxxx
1
<script src="https://code.jquery.com/jquery-3.7.0.min.js" integrity="sha256-2Pmvv0kuTBOenSvLm6bvfBSSHrUJ+3A7x6P5Ebd07/g=" crossorigin="anonymous"></script>
2
3
<div class="form-outline">
4
<textarea class="form-control" id="activity" rows="4" ></textarea>
5
<label class="form-label" for="activity">Activity</label>
6
</div>
7
8
<input type="button" onclick="getData()" value="click">
1
1
xxxxxxxxxx
1
function getData() {
2
console.log('here2');
3
4
$.get(
5
'https://gist.githubusercontent.com/stevesohcot/df79efc84fde53d074675a5d1be18664/raw/31a1a544122758e53c43f5bcaadfc20e2277651d/gistfile1.txt',
6
{my : 'variableHere'},
7
function(responseText) {
8
$('#activity').val( responseText['result']['activity'] );
9
document.querySelectorAll('.form-outline').forEach((formOutline) => {
10
new mdb.Input(formOutline).init();
11
});
12
},
13
"json"
14
);
15
}
Console errors: 0