Try ERPNext Buy Support Partners Foundation Foundation Members

Eventlistener change is not working

I was trying to make a text-editor field have a select option inside in which signatures would appear depending on the name

Custom Script Code:

var s = document.getElementById(‘signatory’);
var one = document.getElementById(‘one’);
var two = document.getElementById(‘two’);

s.addEventListener(‘click’, test);

function test(){
if (s.value == 1) {“block”;“none”;

else if (s.value == 2) {“none”;“block”;
else if (s.value == 3) {

HTML Code(text-editor field):

  	<td style="padding: 0px 20px;">Requested By:</td>
  		<select style="border: none; border-bottom: 1px solid; width: 150px;" id="signatory">
  			<option value="1">Jameszel Ortiz</option>
  			<option value="2">Purchasing</option>

Here the sample of the text editor. Hope you could help me. Thank you!