How to set a Ajax URL so that I can use

How to set a Ajax URL so that I can use

Hi there, I need quick help for ajax. Let me clarify.
kindly visit this website. You will see there is an option to give a like. I want to create an exact similar thing on webflow, I found the way how it works and I have written the custom code the like amount is increased but when I reload the page it’s back to the previous state. Here is the custom code for that. Look both images

The error says: “portfolio:262 Uncaught ReferenceError: myajax is not defined”
On their website, they declare a URL into myajax variable

But in webflow how can I declare an ajax URL for that so that when I reload the page that page should show the increased value not the previous value?

Here is my site Read-Only: [Webflow - Travisweihermuller

Hi Mehedi, welcome to the forum.
It looks like you have the right idea except;

  1. You’ve missing your declaration of myajax, which you’ve found. That JSON needs to exist for your URL to be accessible in the POST.
  2. The current URL in that setting points to a wordpress php script. I’m guessing that this will probably go away if you’re replacing the site?

Have a look instead at, which will give you similar counting capabilities.

Or if you want a more complete likes & favorites feature, check out;

1 Like

Thanks, man, You helped me a lot. I have followed the Jetboost one and it works for me. Can you help me with another thing?
Visit the URL again. Look at the commenting feature. Can you tell me how can I create this type of real-time commenting feature in Webflow ?
Thanks again.

Hey Mehedi, I’d recommend you start a new forum post on that, since it’s a totally different topic. You can mark the solution on this one.

I’ll give it some thought and add some ideas there there I get a chance.

1 Like