I want to display variable fullScript in the HTML below.
I tried this, but it did not work.
What am I doing wrong?
JQUERY
$( document ).ready(function() {
var fullDate = new Date();console.log(fullDate);
var twoDigitMonth = fullDate.getMonth()+"";if(twoDigitMonth.length==1) twoDigitMonth="0" +twoDigitMonth;
var twoDigitDate = fullDate.getDate()+"";if(twoDigitDate.length==1) twoDigitDate="0" +twoDigitDate;
var currentDate = fullDate.getFullYear() +"-"+ twoDigitMonth + "-" + twoDigitDate;
var currentTime = fullDate.getHours() +":"+ fullDate.getMinutes()
console.log(currentDate);
console.log(currentTime);
var fullScript = "/opt/fings/interface/postEnginInstruction.py --call --viewdevicedata 130150000008 "+currentDate+" "+currentTime+" False";
console.log(fullScript);
$('#fullScript').html(fullScript);
});
HTML
<span>
<label for="fullScript" class="frm_label">Script to run</label>
<div class="frmFull"><input type="text" class="editBox readonly" id="fullScript" name="fullScript"/></div>
</span>
PS - console.log(fullScript); is displaying 100%