I am trying to automatically scroll down the bar to see the new message when I submit the form. Or when the page finish loading.
How some reason, I am not sure if the scroll smooth work on this situation.
I tried to write some JavaScript on the page it is not working.
I am talking about the bar on the message box. I can still hide the bar with css but I am trying to automatically see the new message content when I click submit instead of scrolling down the bar to see it.
I tried to use this option you stated. I am not sure if I have to write inside the function or what?
It is not working so far. what I had the onsuccess my entire page become blank.
You cannot have double quotes inside double quotes. Either ‘escape’ them or replace by single quotes.
If you don’t understand the basics of JS, I think it would be better if you read up on it before going further. It is used a lot while developing complex applications in Wappler.
If you are under the impression that you can do everything in Wappler visually, please be advised - you cannot.
I understand how JS work perfectly. I am using trying to see how it will fit with wappler submit element onsuccess. I already have a submit form and it is dynamic.
I even wrote it in the page to see how it will work.
function lastmessage() {var objDiv = document.getElementById( "ChatBoxTop"); objDiv.scrollTop=objDiv.scrollHeight;}
@Arnab_Som, if you want to learn Wappler, then you can start by following these how-to documents and videos. If you have any questions, you can ask these in the forum, and the Wappler community will guide / assist you in finding a solution.
This community is for Wappler and everything related to it. If you want to learn javascript and anything related to general web development, that’s not the right place to do it.