Removing redundant code for wait for ajax. using localized string