]>
gitweb.michael.orlitzky.com - dead/census-tools.git/blob - maputils.js
3d1f2e5cecba3cd9d067f71f1a78aefbaae5a038
3 this.post_data = function(url
, data
) {
4 /* Create a new form, and add it to the DOM. Then, create a hidden
5 input control as a child of the form which contains the data that
6 we'd like to post. Finally, add the form to the document's body,
8 var new_form
= document
.createElement("form");
9 new_form
.method
= "post";
10 new_form
.action
= url
;
11 var new_input
= document
.createElement("input");
12 new_input
.setAttribute("id", "data");
13 new_input
.setAttribute("name", "data");
14 new_input
.setAttribute("type", "hidden");
15 new_input
.setAttribute("value", data
);
16 new_form
.appendChild(new_input
);
17 document
.body
.appendChild(new_form
);