added error style
Added error checking and sending on click of send button.