I would like <iron-ajax>
to POST
dynamic data from a <textarea>
to http://example.net
when I click a <paper-button>
element:
function get_data() {
return {content:document.getElementById("mycontent").html()}
}
<html>
<head>
<!-- Imports-->
</head>
<body>
<iron-ajax
url="//example.net"
></iron-ajax>
<paper-button id="mybutton"></paper-button>
<textarea id="mycontent"></textarea>
</body>
</html>
How can I combine the iron-ajax and paper-button elements to send the data to the server?