Menu
This works, however after it says you must create a title the form continues to submit. How do i halt it until something is in the field?
Thanks
function isEmpty(elem, helperMsg){
if(elem.value.length == 0){
alert(helperMsg);
elem.focus();
return true;
}
return false;
}
<input type=”submit” class=”submit”onclick=”isEmpty(document.getElementById(‘req1’), ‘You must create a title in the title field’)”>