Welcome Guest, Not a member yet? Register   Sign In
Simple chat facility - if file exists not working
#13

(07-05-2020, 10:52 PM)jreklund Wrote: Okay, that's an CSS issue. Should not be solved with JavaScript.
In those stackoverflow (linked above) you got the following solution; https://codepen.io/jimbol/pen/YVJzBg

I have used something similar. Just append your latest message at the top in the DOM and it will work just fine.

I spoke too soon. This is not working the way I expected. I dont want the messages in the column to be reversed. I want the bottom message to remain on the bottom but the scroll bar to be at the bottom, so that the bottom message is displayed when the page is opened.

Another problem I foresee is that Id like the incoming messages to be in "color: Red" and the outgoing messages in "color: Black". Should that be done in the Controller or the view? The "To" and "From" messages are distinguished in the Controller but not in the view.
Reply


Messages In This Thread
RE: Simple chat facility - if file exists not working - by christaliise - 07-06-2020, 08:58 AM



Theme © iAndrew 2016 - Forum software by © MyBB