Post submit JS

bloh

Active member
May I know where is the JS file for:
When submit button is clicked & it checks for the validity of the message & if it passes the test, it post the new message.

I want to insert some JS after the post is successfully submitted.

Any guidance would be appreciated.
 
I think the js file for that part is discussion.js, which can be located at this place. js/xenforo/discussion.js
 
Thanks for your reply.
I tried to look into discussion.js but I couldn't determine which part of the code is the one that I'm looking for: "when the post is successfully submitted"

Would you mind to point me at the right direction?
 
Looking at your first post, I do not think that you need to insert to js. But I could be wrong if I have misunderstood you. Can you please post here in full what you are precisely trying to achive? I will have a better understanding that way.
 
I want to achieve this:
When I successfully submitted a post, preferably it will scroll to the #newpost. If not possible, second best option is to scroll to the bottom of the page.

This is because I want to set the post editor "position: fixed".
When a user submit a post, it may be at the top of the page. So, I need it to scroll down to the new post after submitting.

Hope I make it clear for you.
 
Last edited:
Top Bottom