So I really thought I had this one, but I was wrong. 

I get a response from my ajax post, but I get the html of my view. Here's my
current POST used to just test if I'm getting what i want:

  function searchMarkers(center) {
      var URL = document.getElementById('url').innerHTML + '/locator_view';
      jq.ajax( {
        type: "POST",
        url:  URL,
        data: { "l1": center.geometry.location.lat(), "l2":
center.geometry.location.lng(), "r":
document.getElementById('radius').value},
        error: function(xhr, data, thrownError) {
            alert(xhr.status);
            alert(thrownError);
            alert(data);
        },
        success: function(data) {
            space = document.getElementById('canvas');
            space.innerHTML = data;
            return;
        },
        dataType: "json"
      });
  }

The URL is "http://localhost:8080/plone/dealer-search/locator_view";  with
locator_view being my view, my BrowserView class is locatorView but I'm not
sure how I'm supposed POST directly to it so i only get my json response.
Right now I get a parsererror because it's returning the html of the view.

-- 
View this message in context: 
http://plone.293351.n2.nabble.com/AJAX-POST-to-specific-function-in-product-BrowserView-Class-tp5838117p5842746.html
Sent from the Product Developers mailing list archive at Nabble.com.
_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to