chatboxes

chat boxes appear on user click inside search bar. if chat already
exists previous messages are preloaded otherwise only box appends.
post message when enter is clicked

everything should woe fine the problem is only that site reloads when i
click enter in text input. hope i will find solution fast