Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <script src="//www.polymer-project.org/components/platform/platform.js"></script>
  <link rel="import" href="//www.polymer-project.org/components/paper-input/paper-input.html">
</head>
<body>
  <form id="form_837299"> 
    <paper-input label="Title" name="title" maxlength="255"></paper-input>
    <br/>
    <paper-input floatinglabel multiline label="text" name="text"></paper-input>
    <br/>
    <input type="hidden" name="form_id" value="837299" />
    <input id="saveForm" class="button_text" type="submit" name="submit" value="Submit" />
  </form>
  
  <script>
    (function() {
      var form = document.getElementById('form_837299');
      form.addEventListener('submit', function(event) {
        // Prevent normal form submit
        event.preventDefault();
      });
      document.getElementById('saveForm').addEventListener('click', function() {
        Array.prototype.forEach.call(form.children, function(child) {
          var name = child.getAttribute('name');
          if ('value' in child && child.type !== 'submit' && name) {
            console.log(name, child.value);
            // Use jQuery.ajax or a Polymer/core-ajax element to send
            // the data to the server
          }
        });
      });
    })();
  </script>
  
</body>
</html>
Output 300px

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers