eliyahu moskowitz
02/27/2023, 5:24 PMconst HTMLcontent = `
<p>Please Enter Job # and hit Enter</p>
<input id="jobIdForWordList"></input>
<script>
const theInput = document.getElementById('jobIdForWordList');
console.log('theInput', theInput)
theInput.addEventListener("keyup", function(event) {
console.log('event', event)
if (event.key === 'Enter'){
alert('Enter is pressed!');
window.open('${suiteletFullUrl}&jobId=' + this.value, '_blank');
}
});
</script>
`;
portlet.html = HTMLcontent;
I tested this locally in the console and it works, but for some reason in the NS Portlet, the addEventListener is not getting set / triggered. Is there something im missing?
Thanksbattk
02/27/2023, 5:45 PMbattk
02/27/2023, 5:46 PMeliyahu moskowitz
02/27/2023, 7:46 PM