Questions tagged [ajax]

For questions related to the use of AJAX that are specific to Sitecore (i.e. not general AJAX questions that would be better suited for StackOverflow)

Filter by
Sorted by
Tagged with
0
votes
1answer
49 views

Sitecore 7 Ajax call not working

I have only worked with Sitecore 8+ and for Ajax calls, all I do is this $.ajax({ url: '@Url.Action("ActionName", "ControllerName")', type: "POST", data: '{sampleModel: ' + JSON....
0
votes
1answer
51 views

Sitecore.Web.WebUtil.Redirect not working with Ajax call

I have an Sitecore app (9.0.2) MVC application, in which I send to the Controller a FormCollection object, with an Ajax call (because I create dynamically tabs with in View). On the Controller, I ...
0
votes
0answers
53 views

Calling component from another component via anchor link

I have a modal component which is basically a popup with some content in it. I have to ask if it is possible to link that component from another component. For example I have anchor link in another ...
1
vote
0answers
299 views

jQuery AJAX GET request returning “parsererror” error response message

In a scope of Sitecore Web project an API Contoller is used. Got the following response error message during jQuery AJAX GET API request: On a back-end side I use IHttpActionResult action method that ...
0
votes
2answers
3k views

How do I access Sitecore.Context.Item in normal MVC Controller

I have a normal MVC Controller (not a Sitecore Rendering) which I am calling in an AJAX request (from a Sitecore page). I need the current Sitecore item there. How can I access it there?
1
vote
0answers
130 views

Restricting user from forcing manual submit to the Sitecore Url

Looking for the best practices to tackle a user behavior in my Sitecore 7.5 application. Basically there is an action method decorated with the [HttpPost] attribute. This action is invoked through ...
2
votes
1answer
298 views

Intermittent issues with the Sitecore Ajax Post request while invoking a MVC Action [closed]

I have an application running on Sitecore 7.5 where my code is invoking an MVC Action at client side. The action method is decorated with the [HttpPost] attribute. https://www.XYZ.com/api/sitecore/...
3
votes
2answers
865 views

call to webmethod using ajax doesn't work [closed]

I have a webmethod [WebMethod] public static string GetVendorData(List<VendorData> LstVendorData) { //something } and call it from a ajax method $.ajax({ type: "POST", url:...
2
votes
1answer
522 views

Sitecore Ajax post returning same page

I've trying to make a POST request. It is returning the same page, i.e the whole HTML instead of the result I send via the Controller. @model kgSitecoreTraining.Models.BlogVotes <div class="blog-...
2
votes
1answer
311 views

NullReferenceError for Html.Sitecore().Rendering in Ajax Calls

I need to update page renderings based on search results using ajax call. I have written a method to get rendering collection based on filter and when I call Html.Sitecore().Rendering via loop in view ...
4
votes
3answers
156 views

Why is my Ajax url found when I test in preview mode, but not when I bring up the page in a url I get not found errors

Update: this is what my url is trying to resolve to: /home/about us/api/sitecore/findanaffiliate/getaffiliate/ so here is my Ajax : <script type="text/javascript"> $("#AffiliateList")....
3
votes
2answers
752 views

How do I redirect to another item in Sitecore

while this seems easy, it isn't working Here is my code public ActionResult RenderSelectedItem(string id) { var itemURL = Sitecore.Context.Database.GetItem(id); var link = ...
9
votes
4answers
5k views

Why is my Ajax url not recognizing my sitecore controller or hitting my breakpoint in my sitecore controller?

this is my markup: the ajax is supposed to get called when there is a change to my dropdown selection: this is my ajax jquery: <script> $("#AffiliateList").change(function (e) { ...