Can't seem to create a select toggle. When checkbox is checked enable button, when checkbox is unchecked disable button. I need it to work with the for loops though. The first for loops runs the code properly.

Code JavaScript:
function selectone () {
	var message = document.getElementById('pm');
 
	for (var i = 0; i < message.length; i++)
	{
		if(message[i].checked !== checked)
		{
			document.getElementById('multiple_action').disabled = true;
			document.getElementById('drop_button').setAttribute("class", "drop_button disabled");
		}
	}
	for (var i = 0; i < message.length; i++)
	{
		if(message[i].checked == checked)
		{
			document.getElementById('multiple_action').disabled = false;
			document.getElementById('drop_button').setAttribute("class", "drop_button");
		}
	}
}