I have the following form:
Jquery would do that. On the .keyup event have jquery check if both field's lengths are > 0 and change the button to be disabled or not.
$('#yourButton').button("disable");
$('.fields').bind('keyup', function() {
var nameLength = $("#sub_first_name").length;
var emailLength = $("#sub_email").length;
if (nameLength > 0 && emailLength > 0)
{
$('#yourButton').button("enable");
}
} );