-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Not sure what your real problem is...when you send data
as JSON to the browser view then you have to decode the JSON
on the browser view side. When you return data from a browser view then
you have to encode it as JSON inside the browser view and decode it
on the JS side.

- -aj

kthomps17 wrote:
> 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.
> 


- -- 
ZOPYX Limited           | zopyx group
Charlottenstr. 37/1     | The full-service network for Zope & Plone
D-72070 Tübingen        | Produce & Publish
www.zopyx.com           | www.produce-and-publish.com
- ------------------------------------------------------------------------
E-Publishing, Python, Zope & Plone development, Consulting


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQGUBAEBAgAGBQJNCk0OAAoJEADcfz7u4AZj/6QLwNKMAybvSaDnep97Gn9EBUig
OfBbgOAEtL4Jbf1y4UkvvxZTkGsxRL4MkOolUKzV3t5MkSLFs/s8rmxCSsQEdLOJ
Kl/HGDHdMiFTp4EX4uAcYeTqy8yuQfopriru9BxAd0ogbdezqU68M05nbmwBB4vg
cYS8BD8sGcszyfxOD4YHmT5bzIS/D3xIdqkgU0MfN1mBe0pPmfHmA20G7E1VOdGt
Iwx7nghB3eSlpbV2UOKSUsD5sRwmBK/nk6ZBOBtGChU96Bl6bmxILzk/G0KyDqOs
3GOOCh9rQLfa7CztrVASa9Bo1dS6xsraZQbjzCh0jF10WNIjlQSAjuy3Q8bF+FPW
OhzNZPUF8xwrVDH/fbmE4Cs+f/AMWONiI92TrM6E6J1Vys1wFUvqwhG267QfbyfC
P1J8nerl5vcIk5X46F/qjFYO3psqguNEPE+yw/aVSbXr6s+rFFvRV2df2j25cpNh
6lqC48JYqB9yp2/rH1ByvsyR+HEFDbc=
=56oJ
-----END PGP SIGNATURE-----

<<attachment: lists.vcf>>

_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to