+
+ $.ajax(feature.attributes.comment_url, {
+ type: "POST",
+ data: {
+ text: $(form.text).val()
+ },
+ success: function (data) {
+ map.noteSelector.unselect(feature)
+
+ feature.attributes = data.properties;
+
+ map.noteSelector.select(feature)
+ }
+ });
+ });
+
+ $(feature.popup.contentDiv).find("input#note-close").click(function (e) {
+ var form = e.target.form;
+
+ e.preventDefault();
+
+ $.ajax(feature.attributes.close_url, {
+ type: "POST",
+ data: {
+ text: $(form.text).val()
+ },
+ success: function (data) {
+ map.noteSelector.unselect(feature)
+
+ feature.attributes = data.properties;
+
+ map.noteSelector.select(feature)
+ }
+ });