javascript - MVC refresh PartialVIew using jQuery, and get "Cross Origin Result blocked: ... " error (when loading markers in Google maps) -
so, here bizzar: have partial view, been refreshed using jquery:
<script> $(function () { $('#loadfrommainframe').click(function (e) { e.preventdefault(); console.log("partial load begins here. "); $('#partialparkingdetails').load("/parkingspots/getsearchresult"); }); }); </script>
and button of question , html partial is:
<div id="partialparkingdetails"> @{ viewbag.listdescription = "test list parkingspot:"; html.renderaction("getsearchresult"); } </div> <button id="loadfrommainframe">load mainframe</button> <div id="map-canvas"></div>
the controller contains:
public actionresult getsearchresult(int id=0, ....) { var parkingspots = s in db.parkingspots select s; .... return partialview("_searchresult", parkingspots.tolist()); }
worth noting working okay when google maps not involved. whenever start try update google maps components, error.
are related? did wrong? thanks!
Comments
Post a Comment