if no connection to server there will be no submit