How to make Ajax calls in CMS

Hi Guys,

Could you please what config i have to do for Ajax calls in CMS.

thanks & regards
Ganesh

HI,

please see:

HI Jasper.floor,

thanks for quick reply, but we want to call REST api with Ajax call, like blow sample code snippet, could please let me know if it is supported in CMS.

<@hst.headContribution category=“scripts”>

$(’#prodcurForm").submit(function (event){

$.ajax({
uri: “/site/rest/api/product/loadProducts”
})

}

thanks & regards KGR

I’m not sure I understand you. You can create rest endpoint. See:

Or maybe you are looking for:

Reaching the rest service is up to the client. So that has to be built into the js and the html page.