This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

Submitting comment without page reload
#1

Hi.
I've successfully integrated the commentics script into my website and it works as expected.
There is one part however I'would like to change.
It is the Add Comment button and the way it behaves.
When You click the button the form is submitted and the page is refreshed.
That is the behavior I would like to change, I would like to make the Add Comment button ajax.
I've tried searching the javascript file in order to see where is the function, that is called when You click the button, located so I could debug her and see how the script runs in real time, but I couldn't find it.
Can someone please say can this be done at all, and in which file does the mentioned function resided, or maybe there isn't a javascript function since it is a form, and it targets a specific php script, and I'll do the rest?
Thank You.
Reply
#2

Hi,

The code which handles the processing of the form is in /comments/includes/app/processor.php

I think starchild has managed to get ajax submission on his website. He sent me his files but I haven't had chance to properly look at them yet. You might want to send him a PM.

Have you completed the interview?
Reply
#3

(13-Apr-2013, 08:20 PM)Steven Wrote:  Hi,

The code which handles the processing of the form is in /comments/includes/app/processor.php

I think starchild has managed to get ajax submission on his website. He sent me his files but I haven't had chance to properly look at them yet. You might want to send him a PM.

Hi Steven, could You please search for the files starchild sent You, because he isn't responding to my PM.
I will also look at this issue myself but every possible help I could get is more than welcome.
I wouldn't bother You with this but I'm planning to use this script on second site of mine, so Ajax form submission would be a great feature to add.
Thank You.
Reply
#4

Okay. It may take a bit of time for me to prepare the files because he sent me his whole /comments/ folder as he wasn't sure which files had been changed by his developer. I'll need to determine which files have been changed and remove his database details. I'll try to get it done for tomorrow. When I tested it I could only get certain parts to work but hopefully it will still help as a starting point for you.

Have you completed the interview?
Reply
#5

(23-Apr-2013, 07:01 PM)Steven Wrote:  Okay. It may take a bit of time for me to prepare the files because he sent me his whole /comments/ folder as he wasn't sure which files had been changed by his developer. I'll need to determine which files have been changed and remove his database details. I'll try to get it done for tomorrow. When I tested it I could only get certain parts to work but hopefully it will still help as a starting point for you.

It would be enough for me just to get the files, and I can also do the things You thought of too. Since I'm in need for this this could be my contribute to Your work, and after completion I could share.
I've already analyzed the submit form, where I've stumbled is the includes/sunctions/processor.php.
So, if You need help with this I'me here.
Thank You.
Reply
#6

Here are the files: http://www.commentics.org/download/ajax.zip

/comments/comment.php seems to be the page to view in order to test it.

Have you completed the interview?
Reply
#7

(24-Apr-2013, 07:26 PM)Steven Wrote:  Here are the files: http://www.commentics.org/download/ajax.zip

/comments/comment.php seems to be the page to view in order to test it.

Thank You Steven. Will look into it give a feedback.
Cheers Wink
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by drwx
29-Jun-2023, 09:34 AM
Last Post by Steven
04-Jul-2020, 06:46 PM
Last Post by MattyP
13-Apr-2020, 08:33 PM
Last Post by mtnlvy
06-Jan-2019, 06:29 PM

Forum Jump:


Users browsing this thread: 5 Guest(s)